Re: [git] CFS-devel, latest code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Peter Zijlstra <a.p.zijlstra@...>, Srivatsa Vaddagiri <vatsa@...>, <linux-kernel@...>
Date: Tuesday, October 2, 2007 - 3:59 pm

The following patch (sched: disable sleeper_fairness on SCHED_BATCH)
seems to break GROUP_SCHED. Although, it may be
'oops'-less due to the possibility of 'p' being always a valid
address.


Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>

---
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 8727d17..a379456 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -473,9 +473,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 		vruntime += sched_vslice_add(cfs_rq, se);
 
 	if (!initial) {
-		struct task_struct *p = container_of(se, struct task_struct, se);
-
-		if (sched_feat(NEW_FAIR_SLEEPERS) && p->policy != SCHED_BATCH)
+		if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se) &&
+				task_of(se)->policy != SCHED_BATCH)
 			vruntime -= sysctl_sched_latency;
 
 		vruntime = max_t(s64, vruntime, se->vruntime);

---


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

Messages in current thread:
Re: [git] CFS-devel, latest code, Dmitry Adamushko, (Tue Oct 2, 3:49 pm)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Thu Oct 4, 3:41 am)
Re: [git] CFS-devel, latest code, Dmitry Adamushko, (Tue Oct 2, 3:59 pm)
Re: [git] CFS-devel, latest code, Ingo Molnar, (Thu Oct 4, 3:40 am)
Re: [git] CFS-devel, latest code, Srivatsa Vaddagiri, (Wed Oct 3, 12:15 am)