Re: [PATCH] Replace completions with semaphores
From: Matthew Wilcox
Date: Mon Apr 14 2008 - 13:50:23 EST
On Mon, Apr 14, 2008 at 09:56:38AM -0700, Arjan van de Ven wrote:
> On Mon, 14 Apr 2008 18:32:28 +0200
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > Yeah, I would open code it. But this is indeed a sane usage of the
> > counting semaphore because there is no priority inversion.
>
> Maybe we need a "counter" primitive instead?
> From a conceptual point of view that even makes sense
>
> (the implementation can be pretty much the current semaphore one of course)
I'm only too happy to rename semaphore.c to atomic_counter.c and do
appropriate renames. Or maybe 'kcounter' would be more in vogue for a
name ;-) I'd like a name that implies sleeping, but I'm not able to
think of one right now.
Then semaphores and completions each become wrappers around counters
and everybody's happy. Right?
--
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/