lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9

    * Nikita Danilov <nikita@clusterfs.com> wrote:

    > > look but it doesnt seem simple to convert it. Reiserfs should really use
    > > a normal Linux waitqueue and nothing more...
    >
    > Why? Condition variable is very well known and widely used concept. In
    > the area of their applicability (where predicate whose change is
    > waited upon is protected by a single lock) they provide clean and
    > easily recognizable synchronization device.

    sorry, but just look at the kcond code and compare the 'fastpath' with
    say the fastpath of Linux semaphores or waitqueue handling.

    condition variables (here i dont mean your code specifically, but the
    general pthread concept) are simply trying to achieve too much via a
    single object, which increases their complexity quite significantly.

    Separating out a few select atomic synchronization primitives that can
    be used for each appropriate purpose does the job equally well.

    condition variables are fine if you 1) already know them from userspace
    and 2) want to use a single locking abstraction for everything. It is
    thus also a kitchen-sink primitive that is inevitably slow and complex.
    I still have to see a locking problem where condvars are the
    cleanest/simplest answer, and i've yet to see a locking problem where
    condvars are not the slowest answer ;)

    of course this too is valid kernel code so i'm not complaining at all.
    It was simply too complex to be converted at first sight to
    PREEMPT_REALTIME.

    Ingo
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:4.045 / U:0.292 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site