login
Header Space

 
 

Re: [PATCH] sched: fix to use invalid sched_class

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Hiroshi Shimamoto <h-shimamoto@...>, Andrew Morton <akpm@...>, Peter Zijlstra <a.p.zijlstra@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 6:05 pm

> > Hi Ingo,

I think, the following approach would be a bit more appropriate
(the missing addition to the already existing "don't leak PI boosting prio"):

(not tested)

---
diff --git a/kernel/sched.c b/kernel/sched.c
index bc1a625..da2139e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1646,6 +1646,8 @@ void sched_fork(struct task_struct *p, int clone_flags)
 	 * Make sure we do not leak PI boosting priority to the child:
 	 */
 	p->prio = current->normal_prio;
+	if (!rt_prio(p->prio))
+		p->sched_class = &fair_sched_class;
 
 #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
 	if (likely(sched_info_on()))

---



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] sched: fix to use invalid sched_class, Dmitry Adamushko, (Wed Sep 19, 6:05 pm)
Re: [PATCH] sched: fix to use invalid sched_class, Hiroshi Shimamoto, (Wed Sep 19, 8:01 pm)
Re: [PATCH] sched: fix to use invalid sched_class, Ingo Molnar, (Thu Sep 20, 3:17 am)
speck-geostationary