[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1267786990.2576.6.camel@myhost>
Date: Fri, 05 Mar 2010 19:03:10 +0800
From: "Figo.zhang" <figo1802@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] sched_fair: add schedule equal check condition
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@...il.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);
}
}
--
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