Skip to contentSkip to conversation

fixes for rt/sched

GIT PULL Applied Gregory Haskins 2 participants 3 messages Jan 14, 2009

lore
Share & tools
lore
#0 lore raw

The following changes since commit cfe6498c6a03e574bc9384cc95d73dfd20a13f05:
Steven Rostedt (1):
rt sched: add rt overload stats

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ghaskins/linux-2.6-hacks.git rt/sched

Gregory Haskins (1):
rt/sched: ensure interrupts are disabled during post-schedule() processing

 kernel/sched_rt.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

---------------

rt/sched: ensure interrupts are disabled during post-schedule() processing

Impact: Fix run-time opps at boot up.

post-schedule() is required to run with interrupts disabled, but we currently rely on the caller to have left them disabled for us. This has apparently changed recently such that interrupts are now on and we thus crash. Fix this once and for all by using the irqsave/restore variants of spin_lock(rq).

---

 kernel/sched_rt.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
kernel/sched_rt.c +4 -2
index 856f6fb..0cd6b07 100644
@@ -1348,14 +1348,16 @@ static int needs_post_schedule_rt(struct rq *rq)
 
 static void post_schedule_rt(struct rq *rq)
 {
+	unsigned long flags;
+
 	/*
 	 * This is only called if needs_post_schedule_rt() indicates that
 	 * we need to push tasks away
 	 */
-	spin_lock(&rq->lock);
+	spin_lock_irqsave(&rq->lock, flags);
 	push_rt_tasks(rq);
 	schedstat_inc(rq, rto_schedule_tail);
-	spin_unlock(&rq->lock);
+	spin_unlock_irqrestore(&rq->lock, flags);
 }
 
 /*
#1 lore raw

[ Forgot to CC John the first time around ]

Quoted 58 lines · Gregory Haskins

The following changes since commit cfe6498c6a03e574bc9384cc95d73dfd20a13f05:
Steven Rostedt (1):
rt sched: add rt overload stats

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ghaskins/linux-2.6-hacks.git rt/sched

Gregory Haskins (1):
rt/sched: ensure interrupts are disabled during post-schedule() processing

 kernel/sched_rt.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

---------------

rt/sched: ensure interrupts are disabled during post-schedule() processing

Impact: Fix run-time opps at boot up.

post-schedule() is required to run with interrupts disabled, but we currently rely on the caller to have left them disabled for us. This has apparently changed recently such that interrupts are now on and we thus crash. Fix this once and for all by using the irqsave/restore variants of spin_lock(rq).

---

 kernel/sched_rt.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
kernel/sched_rt.c +4 -2
index 856f6fb..0cd6b07 100644
@@ -1348,14 +1348,16 @@ static int needs_post_schedule_rt(struct rq *rq)
 
 static void post_schedule_rt(struct rq *rq)
 {
+	unsigned long flags;
+
 	/*
 	 * This is only called if needs_post_schedule_rt() indicates that
 	 * we need to push tasks away
 	 */
-	spin_lock(&rq->lock);
+	spin_lock_irqsave(&rq->lock, flags);
 	push_rt_tasks(rq);
 	schedstat_inc(rq, rto_schedule_tail);
-	spin_unlock(&rq->lock);
+	spin_unlock_irqrestore(&rq->lock, flags);
 }
 
 /*
#2 lore raw
Quoted 17 lines · Gregory Haskins

[ Forgot to CC John the first time around ]

Quoted 14 lines · Gregory Haskins

The following changes since commit cfe6498c6a03e574bc9384cc95d73dfd20a13f05:
Steven Rostedt (1):
rt sched: add rt overload stats

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ghaskins/linux-2.6-hacks.git rt/sched

Gregory Haskins (1):
rt/sched: ensure interrupts are disabled during post-schedule() processing

 kernel/sched_rt.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Thanks, applied.

(to git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git)

-- Steve