Re: [PATCH] Replace completions with semaphores

From: Linus Torvalds
Date: Tue Apr 15 2008 - 13:31:21 EST




On Tue, 15 Apr 2008, Andi Kleen wrote:
>
> For normal locks. But if you have N number of outstanding
> events you need to wait for the semaphore is the right primitive.

Right. Except if you were to just use completions instead (which could be
trivially extended to do that).

MUCH more trivial than this complex series.

(You may think that the "Replace completions with semaphores" patch is not
very complicated, but it *is* - it depends very intimately on the big
patch-series that basically turns semaphores into what completions are
now!)

In other words, what makes me not like this is hat we first turn
semaphores into the generic code (which is largely what completions were:
just a special case of the generic semaphores!) and then turns completions
into these things. That just doesn't make any sense to me!

Linus
--
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/