lkml.org 
[lkml]   [2011]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/6] [RFC] alarmtimer: Deboost on nanosleep
    Date
    Example of deboosting tasks before blocking on a wakeup
    source like alarmtimer based nanosleep.

    With this final patch, the kernel will be able to suspend
    when SCHED_STAYAWAKE flagged tasks are blocked on the alarmtimer.

    CC: Rafael J. Wysocki <rjw@sisk.pl>
    CC: arve@android.com
    CC: markgross@thegnar.org
    CC: Alan Stern <stern@rowland.harvard.edu>
    CC: amit.kucheria@linaro.org
    CC: farrowg@sg.ibm.com
    CC: Dmitry Fink (Palm GBU) <Dmitry.Fink@palm.com>
    CC: linux-pm@lists.linux-foundation.org
    CC: khilman@ti.com
    CC: Magnus Damm <damm@opensource.se>
    CC: mjg@redhat.com
    CC: peterz@infradead.org
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    ---
    kernel/time/alarmtimer.c | 5 +++--
    1 files changed, 3 insertions(+), 2 deletions(-)

    diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
    index 00ee80f..c855d40 100644
    --- a/kernel/time/alarmtimer.c
    +++ b/kernel/time/alarmtimer.c
    @@ -568,9 +568,10 @@ static int alarmtimer_do_nsleep(struct alarm *alarm, ktime_t absexp)
    do {
    set_current_state(TASK_INTERRUPTIBLE);
    alarm_start(alarm, absexp, ktime_set(0, 0));
    - if (likely(alarm->data))
    + if (likely(alarm->data)) {
    + sched_deboost_task_active_count(current);
    schedule();
    -
    + }
    alarm_cancel(alarm);
    } while (alarm->data && !signal_pending(current));

    --
    1.7.3.2.146.gca209


    \
     
     \ /
      Last update: 2011-09-26 21:17    [W:0.022 / U:92.292 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site