[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1208023549.6230.37.camel@lappy>
Date: Sat, 12 Apr 2008 20:05:49 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Matthew Wilcox <matthew@....cx>
Cc: Ingo Oeser <ioe-lkml@...eria.de>,
Daniel Walker <dwalker@...sta.com>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...l.org>
Subject: Re: [PATCH] Replace completions with semaphores
On Sat, 2008-04-12 at 11:26 -0600, Matthew Wilcox wrote:
> We can continue the
> discussion about eliminating one or the other API, but my opinion is that
> eliminating either is a mistake. The choice of API indicates how the
> author thinks about the code, which is crucial for those reading the code.
Which is exactly the point, semaphores are rarely the right tool for the
job (I'm currently only aware of XFS that actually uses them as actual
semaphores, and the driver model that uses it to get around lockdep -
still need to come up with a good solution for that).
Even worse, semaphores actively harm the development of linux-rt and
arguably linux kernel development as a whole by not being part of
lockdep - so making a mistake will not be noticed until its too late.
Completions OTOH are not the typical exclusion primitive, they are more
a synchronisation primitive - not unlike wait4(). Typically not things
concerned about priority inversion.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists