aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-07-09 12:51:59 -0400
committerIngo Molnar <mingo@elte.hu>2007-07-09 12:51:59 -0400
commitc18a17329b3389315e8a138d998b217077509c13 (patch)
tree6425c0a3a5eebc9ea78f79506fa610e09f335bf2 /kernel/sched.c
parentf2ac58ee617fd9f6cd9922fbcd291b661d7c9954 (diff)
sched: remove expired_starving()
remove the expired_starving() heuristics from the core scheduler. CFS does not need it, and this did not really work well in practice anyway, due to the rq->nr_running multiplier to STARVATION_LIMIT. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 26795adab3ad..8e44da609c9b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3241,27 +3241,6 @@ unsigned long long task_sched_runtime(struct task_struct *p)
3241} 3241}
3242 3242
3243/* 3243/*
3244 * We place interactive tasks back into the active array, if possible.
3245 *
3246 * To guarantee that this does not starve expired tasks we ignore the
3247 * interactivity of a task if the first expired task had to wait more
3248 * than a 'reasonable' amount of time. This deadline timeout is
3249 * load-dependent, as the frequency of array switched decreases with
3250 * increasing number of running tasks. We also ignore the interactivity
3251 * if a better static_prio task has expired:
3252 */
3253static inline int expired_starving(struct rq *rq)
3254{
3255 if (rq->curr->static_prio > rq->best_expired_prio)
3256 return 1;
3257 if (!STARVATION_LIMIT || !rq->expired_timestamp)
3258 return 0;
3259 if (jiffies - rq->expired_timestamp > STARVATION_LIMIT * rq->nr_running)
3260 return 1;
3261 return 0;
3262}
3263
3264/*
3265 * Account user cpu time to a process. 3244 * Account user cpu time to a process.
3266 * @p: the process that the cpu time gets accounted to 3245 * @p: the process that the cpu time gets accounted to
3267 * @hardirq_offset: the offset to subtract from hardirq_count() 3246 * @hardirq_offset: the offset to subtract from hardirq_count()
@@ -3373,7 +3352,7 @@ static void task_running_tick(struct rq *rq, struct task_struct *p)
3373 3352
3374 if (!rq->expired_timestamp) 3353 if (!rq->expired_timestamp)
3375 rq->expired_timestamp = jiffies; 3354 rq->expired_timestamp = jiffies;
3376 if (!TASK_INTERACTIVE(p) || expired_starving(rq)) { 3355 if (!TASK_INTERACTIVE(p)) {
3377 enqueue_task(p, rq->expired); 3356 enqueue_task(p, rq->expired);
3378 if (p->static_prio < rq->best_expired_prio) 3357 if (p->static_prio < rq->best_expired_prio)
3379 rq->best_expired_prio = p->static_prio; 3358 rq->best_expired_prio = p->static_prio;