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]
Message-ID: <4C4F1846.3090103@codeaurora.org>
Date:	Tue, 27 Jul 2010 10:32:54 -0700
From:	Patrick Pannuto <ppannuto@...eaurora.org>
To:	Jonathan Corbet <corbet@....net>
CC:	Israel Schlesinger <israels@...eaurora.org>,
	linux-kernel@...r.kernel.org, apw@...onical.com,
	akpm@...ux-foundation.org, joe@...ches.com
Subject: Re: [PATCH] checkpatch: Add warnings for use of mdelay()

On 07/27/2010 10:31 AM, Jonathan Corbet wrote:
> On Tue, 27 Jul 2010 10:11:11 -0700
> Israel Schlesinger <israels@...eaurora.org> wrote:
> 
>> mdelay is a busy-wait loop which is wasteful. If at all possible,
>> callers should use msleep instead of mdelay.
>>
>> The only time mdelay is really appropriate is in atomic context,
>> however, delays of 1ms+ in atomic context are rather expensive, so
>> a warning for this case is probably appropriate as well to encourage
>> people to move such expensive delays outside of atomic context
> 
> Once upon a time, msleep(1) would sleep for 20ms, while mdelay(1) gave
> a 1ms delay.  My patch to fix msleep() at that time didn't get in due
> to concerns about the cost of using hrtimers.  Perhaps msleep() has
> gotten better, but, if not, actually getting a 1ms delay remains a
> valid reason for using mdelay() instead IMO.  It made a difference of a
> few seconds at open time for a driver I was doing at the time.
> 
> jon
> --
> 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/

Check out the recently added usleep in -tip, and the checkpatch patch
pending in my queue that fixes that case (I'll send in a few hours ;) )

-pat

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
--
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