Re: Report: Big Improvement in -test3

From: Rik van Riel (riel@conectiva.com.br)
Date: Thu Jul 13 2000 - 11:01:38 EST


On Thu, 13 Jul 2000, Rik van Riel wrote:
> On Wed, 12 Jul 2000, Linus Torvalds wrote:
> > On Thu, 13 Jul 2000, Richard Gooch wrote:
> > >
> > > Er, so how many ticks do a nice 10 and a nice 11 process get,
> > > respectively?
> >
> > Same number of ticks.
>
> Another possibility is to not give the 1 "extra" tick to
> niced processes all the time.
>
> #define NICE_TO_TICKS(nice) ((((20)-(nice)) >> (LOG2_HZ-5))+1)
>
> If we make the "+1" a conditional thing, which is only given to
> processes every ((20)-(nice) / nice) times - or even less - we
> can have larger, maybe even tunable, differences between niced
> tasks...

Ermm, that should of course be something like this:

inline int extra_tick(task_struct * p)
{
        if (p->extra_tick += ((20)-(p->nice)) > 20) {
                p->extra_tick -= 20;
                return 1;
        } else {
                return 0;
        }
}

#define NICE_TO_TICKS(p) ((((20)-(p->nice)) >> (LOG2_HZ-5))+extra_tick(p))

regards,

Rik

--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/ http://www.surriel.com/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:17 EST