[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-8eb90c30e0e815a1308828352eabd03ca04229dd@git.kernel.org>
Date: Sat, 26 Feb 2011 16:23:17 GMT
From: tip-bot for Thomas Gleixner <tglx@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
peterz@...radead.org, tglx@...utronix.de
Subject: [tip:irq/core] sched: Switch wait_task_inactive to schedule_hrtimeout()
Commit-ID: 8eb90c30e0e815a1308828352eabd03ca04229dd
Gitweb: http://git.kernel.org/tip/8eb90c30e0e815a1308828352eabd03ca04229dd
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 23 Feb 2011 23:52:21 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 25 Feb 2011 20:24:22 +0100
sched: Switch wait_task_inactive to schedule_hrtimeout()
When we force thread hard and soft interrupts the startup of ksoftirqd
would hang in kthread_bind() when wait_task_inactive() calls
schedule_timeout_uninterruptible() because there is no softirq yet
which will wake us up.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
LKML-Reference: <20110223234956.677109139@...utronix.de>
---
kernel/sched.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 18d38e4..66ca5d9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2224,7 +2224,10 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
* yield - it could be a while.
*/
if (unlikely(on_rq)) {
- schedule_timeout_uninterruptible(1);
+ ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ);
+
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_hrtimeout(&to, HRTIMER_MODE_REL);
continue;
}
--
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