On Tue, Apr 29, 2008 at 10:09:30AM +1000, David Chinner wrote:Perhaps you can suggest a better one? Our thought was that you have ... struct xfs_inode { struct kcounter_t i_flock }; struct foo { ... other stuff you need for the io ... kcounter_cookie_t kct; } int err = kcounter_claim(&ino->i_flock, &foo->kct); ... kcounter_release(&ino->i_flock, &foo->kct); If you're always using trylock semantics on it, then it's not really a semaphore, is it? Up to 2 billion. ... but not just trylocks, right? There's a sleeping aspect to them too. OK. I don't want to say that. People (and I'm *not* referring to XFS here) manage to abuse semaphores in the most hideous ways. If we tell them to use lower-level constructs, they'll make a mess of using those too. I think we need to look for patterns in the semaphore users which don't fit the mutex pattern or the completion pattern and figure out how to satisfy those users. I don't think there are any plans to get rid of rwsems, though the RT people probably hate rwsems even more than they hate regular semaphores. The mmap rwsem is a compelling argument ;-) -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." --
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Cabot, Mason B | Ext3 vs NTFS performance |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Alan Cox | [PATCH 00/76] Queued TTY Patches |
git: | |
| Nguyen Thai Ngoc Duy | Re: VCS comparison table |
| Ken Pratt | Re: pack operation is thrashing my server |
| Wink Saville | Using git with Eclipse |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Steve Shockley | Re: Real men don't attack straw men |
| Mayuresh Kathe | Re: What is our ultimate goal?? |
| frantisek holop | booting openbsd on eee without cd-rom |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| David Miller | [GIT]: Networking |
| Sven Wegener | [PATCH 2/5] ipvs: Use ERR_PTR for returning errors from make_receive_sock() and ma... |
| Ingo Molnar | Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten |
| Herbert Xu | Re: [PATCH 2/3] [UDP]: Restore missing inDatagrams increments |
