From 84b6a9c559065a93c161b9d04215a18bdea540f0 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 9 Jul 2007 18:51:58 +0200 Subject: [PATCH] --- yaml --- r: 58263 b: refs/heads/master c: f64f61145a38f7039e4f1c0b50dcc3fbe70ec28e h: refs/heads/master i: 58261: 711bcfa9cc1a173f21e8377c3c4bbbc5c098aaa1 58259: 9f60fa8879fcc468d69bf39e1244e24a18443373 58255: 6932915fe1816b3fc3d3c3963d5babf4212738b4 v: v3 --- [refs] | 2 +- trunk/kernel/exit.c | 1 - trunk/kernel/sched.c | 31 ------------------------------- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/[refs] b/[refs] index 8cf86d833208..6b1d51c13718 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c65cc8705256ad7524c97564b4fe3ca9782bf6d1 +refs/heads/master: f64f61145a38f7039e4f1c0b50dcc3fbe70ec28e diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 5c8ecbaa19a5..6c7699240327 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -182,7 +182,6 @@ void release_task(struct task_struct * p) zap_leader = (leader->exit_signal == -1); } - sched_exit(p); write_unlock_irq(&tasklist_lock); proc_flush_task(p); release_thread(p); diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index d6624978feb2..7090982350d3 100644 --- a/trunk/kernel/sched.c +++ b/trunk/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