search for: rw_reader

Displaying 5 results from an estimated 5 matches for "rw_reader".

2008 Jul 29
2
Unexpected b_hdr change.
Hi. We''re testing the most recent ZFS version from OpenSolaris ported to FreeBSD. Kris (CCed) observed strange situation. In function arc_read() he had a panic on assertion that we try to unlock a lock which is not beeing held: rw_enter(&pbuf->b_hdr->b_datalock, RW_READER); err = arc_read_nolock(pio, spa, bp, done, private, priority, flags, arc_flags, zb); rw_exit(&pbuf->b_hdr->b_datalock); <--- THIS ONE The only possiblity was that b_hdr for pbuf was changed somewhere. We diagnozed this further and the b_hdr field is changed in arc_release()...
2007 Nov 24
19
R/W lock portability issue
...were no threads holding the lock. This way ASSERTs never failed). However, now there is a small bit of code that actually relies on RW_LOCK_HELD() working correctly: boolean_t need_lock = !RW_LOCK_HELD(&dp->dp_config_rwlock); if (need_lock) rw_enter(&dp->dp_config_rwlock, RW_READER); I can''t think of a way to emulate this functionality with pthreads without incurring a huge overhead when locking... Any ideas? Thanks, Ricardo -- <http://www.sun.com> *Ricardo Manuel Correia* Lustre Engineering *Sun Microsystems, Inc.* Portugal -------------- next part...
2006 Jun 02
5
Read-write locks in libzpool
..., I think I found a bug in the rw_enter() implementation (emulation?) in libzpool, file /usr/src/lib/libzpool/common/kernel.c: void rw_enter(krwlock_t *rwlp, krw_t rw) { ASSERT(!RW_LOCK_HELD(rwlp)); ASSERT(rwlp->rw_owner != (void *)-1UL); ASSERT(rwlp->rw_owner != curthread); if (rw == RW_READER) (void) rw_rdlock(&rwlp->rw_lock); else (void) rw_wrlock(&rwlp->rw_lock); rwlp->rw_owner = curthread; } Doesn''t RW_LOCK_HELD() check if there''s a reader or a writer locked? If it does, then these read-write locks would produce an assertion when multiple...
2007 May 09
5
Refactor zfs_zget()
Hi, Since almost all operations in the FUSE low-level API identify files by inode number, I''ve been using zfs_zget() to get the corresponding znode/vnode in order to call the corresponding VFS function in zfs_vnops.c. However, there are some cases when zfs_zget() behaves slightly different than I need: 1) If zp->z_unlinked != 0 then zfs_zget() returns ENOENT. I need it to return
2008 Jan 18
33
LatencyTop
I see Intel has released a new tool. Oh, it requires some patches to the kernel to record latency times. Good thing people don''t mind patching their kernels, eh? So who can write the equivalent latencytop.d the fastest? ;-) http://www.latencytop.org/ -- cburgess at qnx.com