Re: nanosleep resolution, jiffies vs microseconds

From: Mike Kravetz
Date: Wed Dec 08 2004 - 12:14:21 EST


On Wed, Dec 08, 2004 at 08:47:48AM -0800, Darren Hart wrote:
> I am looking at trying to improve the latency of nanosleep for short
> sleep times (~1ms). After reading Martin Schwidefsky's post for cputime
> on s390 (Message-ID:
> <20041111171439.GA4900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>), it seems to me
> that we may be able to accomplish this by storing the expire time in
> microseconds rather than jiffies.

My only question would be 'why'? Is there some environment where this
is an issue? -OR- Is this just 'something to do'? Seems to me that the
only environment where this could be an issue is for 'realtime' tasks.
For non-realtime, I would guess that the variability of preemption/scheduling
makes this almost a non-issue. In environments where I have seen heavy
use of nanosleep, there were other scheduling issues that almost always
cause one to 'sleep' longer than the specified time. I'm not opposed to
work in this area. Just curious as to why?

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