Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c18a17329b3389315e8a138d998b217077509c13
Commit:     c18a17329b3389315e8a138d998b217077509c13
Parent:     f2ac58ee617fd9f6cd9922fbcd291b661d7c9954
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 9 18:51:59 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 18:51:59 2007 +0200

    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 <[EMAIL PROTECTED]>
---
 kernel/sched.c |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 26795ad..8e44da6 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3241,27 +3241,6 @@ unsigned long long task_sched_runtime(struct task_struct 
*p)
 }
 
 /*
- * We place interactive tasks back into the active array, if possible.
- *
- * To guarantee that this does not starve expired tasks we ignore the
- * interactivity of a task if the first expired task had to wait more
- * than a 'reasonable' amount of time. This deadline timeout is
- * load-dependent, as the frequency of array switched decreases with
- * increasing number of running tasks. We also ignore the interactivity
- * if a better static_prio task has expired:
- */
-static inline int expired_starving(struct rq *rq)
-{
-       if (rq->curr->static_prio > rq->best_expired_prio)
-               return 1;
-       if (!STARVATION_LIMIT || !rq->expired_timestamp)
-               return 0;
-       if (jiffies - rq->expired_timestamp > STARVATION_LIMIT * rq->nr_running)
-               return 1;
-       return 0;
-}
-
-/*
  * Account user cpu time to a process.
  * @p: the process that the cpu time gets accounted to
  * @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)
 
                if (!rq->expired_timestamp)
                        rq->expired_timestamp = jiffies;
-               if (!TASK_INTERACTIVE(p) || expired_starving(rq)) {
+               if (!TASK_INTERACTIVE(p)) {
                        enqueue_task(p, rq->expired);
                        if (p->static_prio < rq->best_expired_prio)
                                rq->best_expired_prio = p->static_prio;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to