Messages in this thread |  | | | Date | Mon, 10 May 1999 09:56:50 +0200 (CEST) | | From | Rik van Riel <> | | Subject | Re: [patch] new scheduler |
| |
On Mon, 10 May 1999, Rogier Wolff wrote: > Rik van Riel wrote: > > > > No. Interactive processes that don't use up their time slice > > before jiffies reaches p->defer will get their time slice > > fully reinstated in wake_up_process(). > > Ah, but this is bad. > > The constant would be tuned to fill about 80 or 90% of a timer tick. > The program would run for 2.5 times as much real-time compared to when > the "usleep" wasn't there, but it would get accounted for less than > 10% of the original CPU time!
It seems like I wasn't clear in my explanation...
In wake_up_process(): + if (time_after(jiffies, p->defer)) { + p->defer = jiffies; + p->counter = p->priority; + } If a process _does_ use up it's time slice, defer will be set so far away that this code will only be triggered if the task uses less than 33% of the CPU with a system load of 2...
There might be some brain farts left, but I don't think I fell for that trap :)
Rik -- Open Source: you deserve to be in control of your data. +-------------------------------------------------------------------+ | Le Reseau netwerksystemen BV: http://www.reseau.nl/ | | Linux Memory Management site: http://humbolt.geo.uu.nl/Linux-MM/ | | Nederlandse Linux documentatie: http://www.nl.linux.org/ | +-------------------------------------------------------------------+
- 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/
|  |