Re: kernel 2.3.31 seems to busy wait for sleep < 2 msec, is this not a bad idea?

Matthew Wilcox (willy@thepuffingroup.com)
Wed, 29 Dec 1999 16:47:34 -0500


On Wed, Dec 29, 1999 at 01:45:58PM -0500, Gautam H Thaker wrote:
>
> Recently someone on the ACE/TAO list pointed me to Linux 2.3.x
> development kernels that are being modified to improve scheduler
> determinism. When I started to look around Linux 2.3.31 code I noted
> this bit of "busy wait" for sleeps < 2 msec using nanosleep().

[...]

> /*
> * Short delay requests up to 2 ms will be handled with
> * high precision by a busy wait for all real-time
> processes.
> *
> * Its important on SMP not to do this holding locks.
> */

The comment explains all; it's only used for tasks with realtime
scheduling policy. For these tasks, it matters not at all that they
hog the machine and it matters a great deal that they are accurately
scheduled.

-
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/