From: Rajat Jain on

Hi,

>
> I thought hrtimers allow higher-precision wakeups these days?
> Of course, if you only want to sleep for a few microseconds, the
> context switch might take longer than you want to sleep...

Yes, that is right. Sorry, I missed that. But that is purely HW
dependent - if your HW providea a high precision timer (Such as HPET on
latest Intel machines), that can be used for quicker sleeps.

Thanks,

Rajat
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Rik van Riel on
On 11/04/2009 12:36 AM, Bryan Donlan wrote:

> I thought hrtimers allow higher-precision wakeups these days?
> Of course, if you only want to sleep for a few microseconds, the
> context switch might take longer than you want to sleep...

Also, you may not be in a context where you can schedule.

Sometimes drivers need to implement a small delay (to wait
for something on the device) while holding a spinlock or
while interrupts are disabled.

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