diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-09 18:51:58 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 18:51:58 +0200 |
commit | f64f61145a38f7039e4f1c0b50dcc3fbe70ec28e (patch) | |
tree | 5864c65e858dc320ab16d6025132bd26d4f54e7e /kernel | |
parent | c65cc8705256ad7524c97564b4fe3ca9782bf6d1 (diff) | |
download | op-kernel-dev-f64f61145a38f7039e4f1c0b50dcc3fbe70ec28e.zip op-kernel-dev-f64f61145a38f7039e4f1c0b50dcc3fbe70ec28e.tar.gz |
sched: remove sched_exit()
remove sched_exit(): the elaborate dance of us trying to recover
timeslices given to child tasks never really worked.
CFS does not need it either.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 1 | ||||
-rw-r--r-- | kernel/sched.c | 31 |
2 files changed, 0 insertions, 32 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 5c8ecba..6c769924 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -182,7 +182,6 @@ repeat: zap_leader = (leader->exit_signal == -1); } - sched_exit(p); write_unlock_irq(&tasklist_lock); proc_flush_task(p); release_thread(p); diff --git a/kernel/sched.c b/kernel/sched.c index d662497..7090982 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1831,37 +1831,6 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) task_rq_unlock(this_rq, &flags); } -/* - * Potentially available exiting-child timeslices are - * retrieved here - this way the parent does not get - * penalized for creating too many threads. - * - * (this cannot be used to 'generate' timeslices - * artificially, because any timeslice recovered here - * was given away by the parent in the first place.) - */ -void fastcall sched_exit(struct task_struct *p) -{ - unsigned long flags; - struct rq *rq; - - /* - * If the child was a (relative-) CPU hog then decrease - * the sleep_avg of the parent as well. - */ - rq = task_rq_lock(p->parent, &flags); - if (p->first_time_slice && task_cpu(p) == task_cpu(p->parent)) { - p->parent->time_slice += p->time_slice; - if (unlikely(p->parent->time_slice > task_timeslice(p))) - p->parent->time_slice = task_timeslice(p); - } - if (p->sleep_avg < p->parent->sleep_avg) - p->parent->sleep_avg = p->parent->sleep_avg / - (EXIT_WEIGHT + 1) * EXIT_WEIGHT + p->sleep_avg / - (EXIT_WEIGHT + 1); - task_rq_unlock(rq, &flags); -} - /** * prepare_task_switch - prepare to switch tasks * @rq: the runqueue preparing to switch |