diff mbox

[6/6,RFC] alarmtimer: Deboost on nanosleep

Message ID 1316827963-13122-7-git-send-email-john.stultz@linaro.org
State RFC
Headers show

Commit Message

John Stultz Sept. 24, 2011, 1:32 a.m. UTC
Example of deboosting tasks before blocking on a wakeup
source like alarmtimer based nanosleep.

Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 kernel/time/alarmtimer.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index 523a123..f2fe16e 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -566,9 +566,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));