Re: [PATCH] Replace completions with semaphores

From: Matthew Wilcox
Date: Sat Apr 12 2008 - 16:48:22 EST


On Sat, Apr 12, 2008 at 12:53:30PM -0700, Roland Dreier wrote:
> Just make sure you don't forget the history of completions... As
> Linus said long ago (http://lwn.net/2001/0802/a/lt-completions.php3):
>
> In case anybody cares, the race was that Linux semaphores only protect the
> accesses _inside_ the semaphore, while the accesses by the semaphores
> themselves can "race" in the internal implementation. That helps make an
> efficient implementation, but it means that the race was:

Yes, that text appears in the URL I provided in the mail that started
this thread ;-)

The semaphore rewrite I did does not have this problem (it's less
efficient than the hand-optimised assembler, but much more maintainable).
You're supposed to be using mutexes if you want efficiency anyway.

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