Trond Myklebust <[email protected]> wrote: > > AFAICS You grab the wait_queue_t lock once in down()/__mutex_lock() > order to try to take the lock (or queue the waiter if that fails), then > once more in order to pass the mutex on to the next waiter on > up()/mutex_unlock(). That is more or less the exact same thing I was > doing with iosems using bog-standard waitqueues, and which Ben has > adapted to his mutexes. What am I missing? In Ben's patch it looks like the down() grabs the spinlock twice. Once to queue yourself and one to dequeue yourself. The up() grabs the spinlock once to wake you up, but it wasn't obvious that it actually dequeues you. David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Trond Myklebust <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Benjamin LaHaise <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Trond Myklebust <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Trond Myklebust <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Andrew Morton <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Suparna Bhattacharya <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Trond Myklebust <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Benjamin LaHaise <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: Christoph Hellwig <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- From: David Howells <[email protected]>
- Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- Prev by Date: Re: ACPI/HT or Packet Scheduler BUG?
- Next by Date: Re: Fortuna
- Previous by thread: Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
- Next by thread: [RFC] Allow open intents to return a fully initialized file
- Index(es):