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

    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? On the one hand, it clearly denotes how one uses it --
    > that it's initially 'locked' and becomes 'unlocked' later. On the
    > other hand, it is Yet Another Thing to be maintained; I had to
    > add wait_for_completion_killable(), probably there needs to be a
    > wait_for_completion_killable_timeout() too.

    >From my perspective it should be keep completions , and remove
    semaphores.. The problem with semaphores is the lack of a strict API,
    and loose usage. I've seen a lot of "creative" locking in the kernel,
    and if we allow that we're just asking for continued maintainability
    problems in the code that uses semaphores. At times I've spent hours
    trying to figure out what a semaphore is doing, or suppose to be doing.
    If we enforce strict usage of semaphores, then we'll basically reproduce
    mutex usage, and we have a generic mutex already..

    Daniel




    \
     
     \ /
      Last update: 2008-04-12 08:45    [W:3.105 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site