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

    On Mon, 2008-04-14 at 19:54 +0200, Peter Zijlstra wrote:
    > On Mon, 2008-04-14 at 19:46 +0200, Andi Kleen wrote:
    > > Peter Zijlstra <peterz@infradead.org> writes:
    > > >
    > > > Yeah, I would open code it. But this is indeed a sane usage of the
    > > > counting semaphore because there is no priority inversion.
    > >
    > > But when you open code that, how is it different from just having
    > > semaphores?
    >
    > Because we can then eventually get rid of semaphores, so those people
    > cannot mistakenly use them. Its just too easy to create prio inversion
    > with them around.

    I'm not for open coding anything .. This "writes in flight" type code
    happens often enough we should have something that covers it..
    completions come fairly close (since they're just like locked
    semaphores) only it's not easy to initialize them to allow multiple
    completes before the waiting starts..

    Daniel



    \
     
     \ /
      Last update: 2008-04-14 20:11    [W:4.066 / U:0.316 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site