> -----Original Message----- > From: Erik Mouw [mailto:mouw@xxxxxxxxxxxx] > Sent: Wednesday, February 28, 2007 3:36 AM > To: Bizhan Gholikhamseh (bgholikh) > Cc: kernelnewbies@xxxxxxxxxxxx > Subject: Re: sleep() API behaves different between 2.4 and 2.6 > > On Wed, Feb 28, 2007 at 02:32:43AM -0800, Bizhan Gholikhamseh > (bgholikh) wrote: > > I have a simple program utilizing "sleep()" api to sleep 3 msec > > periodically. > > I measured the time difference before calling the api and after it > > returns back. > > The same application behaves differently running on Linux > 2.4 and 2.6 > > In Linux 2.6.11, it takes about 3 msec, and running on > Linux 2.4.20 it > > takes about 10 msec. > > Your 2.6 kernel probably runs with HZ=1000. 2.4 kernels run > with HZ=100, so the minimum sleep time is actually 1/HZ = 10 msec. Is it possible to change the HZ on my 2.4 kernel? Thanks -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ