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

Roger Larsson (roger.larsson@skelleftea.mail.telia.com)
Fri, 31 Dec 1999 00:50:36 +0100


Hi all,

There has been latency problems with this code...
(I do not have the 2.3.x kernels so I do not know the current state)

Since this busy wait is done in the kernel it will prevent
context switches to other higher priority RT processes.

Ingo Molnar found this an checks for 'need_resched' in the loop.
See
http://www.redhat.com/~mingo/lowlatency-2.2.13-A1

The current state of 2.3 as I understand it is:
- Some long execution paths have been removed by changing algorithm.
- Other places where that _can_not_ be done will be patched in the
same way as for 2.2.13 (when other stuff has stabilized)

/RogerL

Matthew Wilcox wrote:
>
> 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/

-- 

The Internet interprets Windows as damage, and routes around it.

Roger Larsson Skellefteċ Sweden

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