[lkml]   [1999]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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: |
| Linux Memory Management site: |
| Nederlandse Linux documentatie: |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean