Re: [PATCH] Replace completions with semaphores
From: Matthew Wilcox
Date: Sun Apr 13 2008 - 08:58:13 EST
On Sun, Apr 13, 2008 at 09:08:33AM +0200, Ingo Molnar wrote:
> but semaphores will be _removed_, _completely_. Rewriting them in
> generic C code is just the first step towards that - it consolidates all
> the myriads of semaphore implementations that Linux has spread out.
I think you're dreaming. We have 11 places in the tree that currently
demand to use a counting semaphore (with 'n' plausibly greater than 1).
If we remove the facility, these places are going to invent their own
weird locking schemes.
> your proposed change to change completions to semaphores is totally
> backwards and prolongs an API we want to get rid of. Did you miss this
> aspect of the mutex rewrite, of the semaphore-to-mutex,
> semaphore-to-completions and semaphore-to-rwsem conversions?
Yes -- because it wasn't raised at the time for semaphore-to-completions.
It was raised for semaphore-to-mutex, of course. And I agree that we
/want/ to be rid of counting semaphores, but I don't see a way to do it.
I do believe tht we should be converting all the semaphore users to
mutexes that we can (eg scx200_wdt.c), and converting semaphore users to
completions where that makes sense (eg libusual.c). But there's still
the other dozen places to support.
--
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."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/