Re: nanosleep resolution, jiffies vs microseconds

From: Darren Hart
Date: Wed Dec 08 2004 - 13:34:13 EST


On Wed, 2004-12-08 at 09:14 -0800, Paul E. McKenney wrote:
> Hello, Darren,
>
> Thank you very much for getting to the bottom of this!
>
> This is mostly an issue when sleeping for small numbers of ticks,
> so if HZ was 10000, a nanosleep(1000000) would get bumped by
> a couple hundred microseconds rather than the current milliseconds,
> right?

yes.

>
> Further, if one were to do nanosleep(900000) given HZ of 1024,
> the expected sleep time would be 2 milliseconds, right?

and yes.

--
Darren Hart <dvhltc@xxxxxxxxxx>
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/