lkml.org 
[lkml]   [2008]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: + do_wait-wakeup-optimization.patch added to -mm tree
    On 11/23, Roland McGrath wrote:
    >
    > > > +static int do_wait_wake_function(wait_queue_t *curr, unsigned mode, int sync,
    > > > + void *key)
    > > > +{
    > > > + struct task_struct *task = current;
    > >
    > > I think we can fix (and simplify) this code if we change __wake_up_parent(),
    > > it should call __wake_up(key => p), so we can do
    > >
    > > struct task_struct *task = key;
    >
    > I don't see an exposed __wake_up* variant that both passes a "key" pointer
    > through and does "sync". For __wake_up_parent, "sync" is quite desireable.

    Well, yes... and __wake_up_common() is static. Perhaps we can make a new
    helper. I must admit, I don't understand what "sync" actually means nowadays.

    > > > + if (!needs_wakeup(task, w))
    > > > + return 0;
    > > > +
    > > > + return default_wake_function(curr, mode, sync, key);
    > >
    > > perhaps autoremove_wake_function() makes more sense.
    >
    > Why? The do_wait loop will have to go through again and still might just
    > sleep again. The explicit remove at the end of do_wait seems fine to me.

    Yes, yes, I was wrong. I forgot about "repeat:" in do_wait().

    Oleg.



    \
     
     \ /
      Last update: 2008-12-04 16:31    [W:0.025 / U:59.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site