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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 16 Jul 2007 12:48:44 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Jonathan Corbet <corbet@....net>
Cc:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH/RFC] msleep() with hrtimers


* Jonathan Corbet <corbet@....net> wrote:

> The OLPC folks and I recently discovered something interesting: on a 
> HZ=100 system, a call to msleep(1) will delay for about 20ms.  The 
> combination of jiffies timekeeping and rounding up means that the 
> minimum delay from msleep will be two jiffies, never less.  That led 
> to multi-second delays in a driver which does a bunch of short 
> msleep() calls and, in response, a change to mdelay(), which will come 
> back in something closer to the requested time.
> 
> Here's another approach: a reimplementation of msleep() and 
> msleep_interruptible() using hrtimers.  On a system without real 
> hrtimers this code will at least drop down to single-jiffy delays much 
> of the time (though not deterministically so).  On my x86_64 system 
> with Thomas's hrtimer/dyntick patch applied, msleep(1) gives almost 
> exactly what was asked for.
> 
> jon
> 
> Use hrtimers for msleep() and msleep_interruptible()
> 
> Signed-off-by: Jonathan Corbet <corbet@....net>

i certainly like this - an msleep() is like mdelay(), so there are real 
delays (and not timeouts) involved, so converting to hrtimers is the 
right thing to do from a conceptual POV too.

Acked-by: Ingo Molnar <mingo@...e.hu>

	Ingo
-
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