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: <20081118064943.332516f7@infradead.org>
Date:	Tue, 18 Nov 2008 06:49:43 -0800
From:	Arjan van de Ven <arjan@...radead.org>
To:	Mikulas Patocka <mpatocka@...hat.com>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, rml@...h9.net,
	Alasdair G Kergon <agk@...hat.com>,
	Milan Broz <mbroz@...hat.com>
Subject: Re: Active waiting with yield()

On Tue, 18 Nov 2008 09:34:16 -0500 (EST)
> So what are the reasons why you (and others) are against active
> waiting? All you are saying is that my reasons are wrong, but you
> haven't single example when active waiting causes trouble. If there
> is a workload when waiting 1ms-to-10ms with mdelay(1) on driver
> unload would cause discomfort to the user, describe it.
> 

mdelay()
* costs you quite a bit of power
* will cause your cpu to go to full speed
* makes it more likely that your fan goes on
* takes away CPU time from others who do want to run
  - including the guy you are waiting for!
* if you do it with interrupts off you can even cause time skew
* adds 10 milliseconds of latency to the entire system, which is very
  user noticable in a desktop environment (the threshold for that is
  like 1 or 2 milliseconds total)

now there are some cases, mostly during error recovery or driver init
slowpaths where mdelay() can be justified, but "I'm too lazy to use a
waitqueue or other sleeping construct" is not one of them.

-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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