Re: [PATCH] O11int for interactivity

Con Kolivas
2003-07-30T01:04:28Z

On Wed, 30 Jul 2003 10:55, Con Kolivas wrote:
> On Wed, 30 Jul 2003 10:38, Con Kolivas wrote:
> > Update to the interactivity patches. Not a massive improvement but
> > more smoothing of the corners.
>
> Woops my bad. Seems putting things even at the start of the expired array
> can induce a corner case. Will post an O11.1 in a few mins to back out that
> part.

Here is O11.1int which backs out that part. This was only of minor help
anyway so backing it out still makes the other O11 changes worthwhile.

A full O11.1 patch against 2.6.0-test2 is available on my website.

--- linux-2.6.0-test2-mm1/kernel/sched.c 2003-07-30 10:54:54.000000000 +1000
+++ linux-2.6.0-test2mm1O11/kernel/sched.c 2003-07-30 10:46:43.000000000 +1000
@@ -310,14 +310,6 @@ static inline void enqueue_task(struct t
p->array = array;
}

-static inline void enqueue_head_task(struct task_struct *p, prio_array_t *array)
-{
- list_add(&p->run_list, array->queue + p->prio);
- __set_bit(p->prio, array->bitmap);
- array->nr_active++;
- p->array = array;
-}
-
/*
* effective_prio - return the priority that is based on the static
* priority but is modified by bonuses/penalties.
@@ -1305,13 +1297,10 @@ void scheduler_tick(int user_ticks, int
* run out of sleep_avg to be expired, and when they
* do they are put at the start of the expired array
*/
- if (unlikely(p->interactive_credit)){
- if (p->sleep_avg){
- enqueue_task(p, rq->active);
- goto out_unlock;
- }
- enqueue_head_task(p, rq->expired);
- } else
+ if (unlikely(p->interactive_credit && p->sleep_avg)){
+ enqueue_task(p, rq->active);
+ goto out_unlock;
+ }
enqueue_task(p, rq->expired);
} else
enqueue_task(p, rq->active);