Messages in this thread | | | Subject | Re: [patch] new scheduler | Date | Mon, 10 May 1999 09:30:25 +0200 (MEST) | From | (Rogier Wolff) |
| |
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.
On SunOS, I had a program that did:
for (i=0;i<SOMELARGECONSTANT;i++) { do_something (); if (i % SOMECONSTANT == 0) usleep (10); }
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!
If I understand you correctly, when I'm competing with another batch process for CPU, I'd normally get only 50% of the CPU. With your patch I could now boost that to 80 or 90% by giving up the CPU (usleep) just before my timeslice is over?
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* ------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------
- 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/
| |