public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched_fair: add schedule equal check condition
@ 2010-03-05 11:03 Figo.zhang
  0 siblings, 0 replies; only message in thread
From: Figo.zhang @ 2010-03-05 11:03 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: lkml

 
in check_preempt_tick() function, the check schedule condition,the reality increasing runtime 
"delta_exec", vruntion increasing runtime "delta" and reality ideal time "ideal_runtime":
	if (delta_exec > ideal_runtime)
and
	if (delta > ideal_runtime)
if equal, it had better be schedule.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
---
kernel/sched_fair.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 8fe7ee8..65fd43e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -859,7 +859,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
 
 	ideal_runtime = sched_slice(cfs_rq, curr);
 	delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
-	if (delta_exec > ideal_runtime) {
+	if (delta_exec >= ideal_runtime) {
 		resched_task(rq_of(cfs_rq)->curr);
 		/*
 		 * The current task ran long enough, ensure it doesn't get
@@ -884,7 +884,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
 		struct sched_entity *se = __pick_next_entity(cfs_rq);
 		s64 delta = curr->vruntime - se->vruntime;
 
-		if (delta > ideal_runtime)
+		if (delta >= ideal_runtime)
 			resched_task(rq_of(cfs_rq)->curr);
 	}
 }



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-05 11:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 11:03 [PATCH] sched_fair: add schedule equal check condition Figo.zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox