Re: [linux-audio-dev] Big Qthread vs. pthread and usleep problem

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Big Qthread vs. pthread and usleep problem
From: martijn sipkema (msipkema_AT_sipkema-digital.com)
Date: Fri Nov 30 2001 - 14:28:04 EET


> You can't "just sleep" for less than 20ms. The system timer has that
> resolution (at least, by default on x86; its different on other
> architectures and it can be changed at kernel compile time), and it is
> what is used to wakeup processes that call sleep/usleep/nanosleep. see
> below for more.
>
> it would make it worse. SCHED_RR or SCHED_FIFO threads that call
> usleep with values *less* than 20ms will busy wait. don't do it.

i read something a while ago about a kernel patch that didn't use the
traditional approach of having an interrupt generated at the scheduler
quantum rate but instead programmed the programmable interval timer
(i think) dynamically when in the scheduler. this would make blocking sub-
scheduler quantum sleeps possible. the patch was done (for different
reasons) by ibm iirc.

--martijn


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Nov 30 2001 - 14:27:05 EET