[lkml]   [2008]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.

 \ /
  Last update: 2008-04-12 20:09    [W:0.125 / U:1.656 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site