lkml.org 
[lkml]   [2011]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 3/7] signal: retarget_shared_pending: optimize while_each_thread() loop
    Hello,

    More nitpicks.

    On Mon, Apr 18, 2011 at 03:45:18PM +0200, Oleg Nesterov wrote:
    > --- sigprocmask/kernel/signal.c~3_optimize_retarget_loop 2011-04-17 21:08:05.000000000 +0200
    > +++ sigprocmask/kernel/signal.c 2011-04-17 21:28:21.000000000 +0200
    > @@ -2033,8 +2033,18 @@ static void retarget_shared_pending(stru
    >
    > t = tsk;
    > while_each_thread(tsk, t) {
    > - if (!signal_pending(t) && !(t->flags & PF_EXITING))
    > - recalc_sigpending_and_wake(t);
    > + if ((t->flags & PF_EXITING))

    Inner () unnecessary.

    > + continue;
    > + if (!has_pending_signals(&shared_pending, &t->blocked))
    > + continue;
    > +
    > + sigandsets(&shared_pending, &shared_pending, &t->blocked);
    > +
    > + if (!signal_pending(t))
    > + signal_wake_up(t, 0);
    > +
    > + if (sigisemptyset(&shared_pending))
    > + break;

    More comments, please. Other than that,

    Acked-by: Tejun Heo <tj@kernel.org>

    --
    tejun


    \
     
     \ /
      Last update: 2011-04-25 13:05    [W:0.024 / U:0.272 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site