[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1317064434-1829-7-git-send-email-john.stultz@linaro.org>
Date: Mon, 26 Sep 2011 12:13:54 -0700
From: John Stultz <john.stultz@...aro.org>
To: lkml <linux-kernel@...r.kernel.org>
Cc: John Stultz <john.stultz@...aro.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, arve@...roid.com,
markgross@...gnar.org, Alan Stern <stern@...land.harvard.edu>,
amit.kucheria@...aro.org, farrowg@...ibm.com,
"Dmitry Fink (Palm GBU)" <Dmitry.Fink@...m.com>,
linux-pm@...ts.linux-foundation.org, khilman@...com,
Magnus Damm <damm@...nsource.se>, mjg@...hat.com,
peterz@...radead.org
Subject: [PATCH 6/6] [RFC] alarmtimer: Deboost on nanosleep
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@...k.pl>
CC: arve@...roid.com
CC: markgross@...gnar.org
CC: Alan Stern <stern@...land.harvard.edu>
CC: amit.kucheria@...aro.org
CC: farrowg@...ibm.com
CC: Dmitry Fink (Palm GBU) <Dmitry.Fink@...m.com>
CC: linux-pm@...ts.linux-foundation.org
CC: khilman@...com
CC: Magnus Damm <damm@...nsource.se>
CC: mjg@...hat.com
CC: peterz@...radead.org
Signed-off-by: John Stultz <john.stultz@...aro.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists