From: Con Kolivas Here is a small patch against O12.2. This should not change peformance in any way but removes redundant code (which we all love to do). Ingo pointed out that new forks wont have any sleep time to earn as sleep_avg. It is also extrememly unlikely that there won't be any sleep time with nanosecond timing. Patch applies to 2.6.0-test2-mm4 or test2 patched with O12.2. kernel/sched.c | 10 +--------- 1 files changed, 1 insertion(+), 9 deletions(-) diff -puN kernel/sched.c~o12.3 kernel/sched.c --- 25/kernel/sched.c~o12.3 2003-08-23 13:57:26.000000000 -0700 +++ 25-akpm/kernel/sched.c 2003-08-23 13:57:26.000000000 -0700 @@ -364,9 +364,6 @@ static void recalc_task_prio(task_t *p, unsigned long long __sleep_time = now - p->timestamp; unsigned long sleep_time; - if (unlikely(!p->timestamp)) - __sleep_time = 0; - if (__sleep_time > NS_MAX_SLEEP_AVG) sleep_time = NS_MAX_SLEEP_AVG; else @@ -419,8 +416,7 @@ static void recalc_task_prio(task_t *p, p->interactive_credit++; } } - } else if (!p->sleep_avg) - p->interactive_credit--; + } p->prio = effective_prio(p); } @@ -453,9 +449,6 @@ static inline void activate_task(task_t */ p->activated = 1; - if (unlikely(!p->timestamp)) - p->activated = 0; - p->timestamp = now; __activate_task(p, rq); @@ -643,7 +636,6 @@ void wake_up_forked_process(task_t * p) p->sleep_avg = JIFFIES_TO_NS(sleep_avg); p->interactive_credit = 0; - p->timestamp = 0; p->prio = effective_prio(p); set_task_cpu(p, smp_processor_id()); _