lkml.org 
[lkml]   [2008]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Replace completions with semaphores

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Fri, 2008-04-11 at 15:00 -0600, Matthew Wilcox wrote:
>
> > So does it make sense to retain the completion as a primitive in
> > Linux?
>
> My take on it is the opposite: kill off semaphores and leave the
> completions around.

exactly. I first misread the subject line because i parsed it as
"replace semaphores with completions" and i thought "cool", then did i
realize that the patch does it the other way around. Converting
completions to semaphores just makes no sense.

Besides all your arguments later in this thread about how problematic
locking primitives semaphores are because they are so vague (which are
all correct), there's also another aspect: completions are faster a bit
in theory, because they know that they will schedule most of the time -
while semaphores assume that they will _not_ schedule. (And that's
exactly because the intent of the developer when using a completion is
crystal clear.)

Ingo


\
 
 \ /
  Last update: 2008-04-13 09:07    [from the cache]
©2003-2011 Jasper Spaans