lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 04 Nov 2009 09:16:57 -0500
From:	Rik van Riel <riel@...hat.com>
To:	Bryan Donlan <bdonlan@...il.com>
CC:	Rajat Jain <Rajat.Jain@...ogain.com>, loody <miloody@...il.com>,
	linux-kernel@...r.kernel.org,
	Kernel Newbies <kernelnewbies@...linux.org>
Subject: Re: why kernel implement "udelay" by cpu instructions?

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ