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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 May 2011 16:04:06 +0200
From:	"Eibach, Dirk" <Eibach@...ys.de>
To:	"Clemens Ladisch" <clemens@...isch.de>
Cc:	<linux-kernel@...r.kernel.org>
Subject: RE: msleep() an load average

> > while(1) msleep_interruptible(1000);
> > 
> > Is this code really any better?
> 
> You should handle signals, probably by blocking any that 
> you're not interested in, and exiting on any fatal one.

As I am a great kernel hacker, all signals are blocked ;)

> Anyway, polling is bad; this code forces the CPU to wake up 
> once per second.  What is your thread _actually_ waiting for?
> (I guess it has more code than what you wrote?)

Sure, polling is bad, but sometimes hard to avoid. My system is
monitoring some hardware it doesn't trust and looks once in a while if
it's still alive, just to make sure. As this is an embedded system
without any energy saving measures, waking up the CPU is not that much
of a problem.

Cheers
Dirk
--------------------------------------------------------------------------
Guntermann & Drunck GmbH Systementwicklung 
Dortmunder Str. 4a 
D-57234 Wilnsdorf - Germany 
Tel: +49 (0) 27 39 / 89 01 - 100  Fax: +49 (0) 27 39 / 89 01 - 120 
E-Mail: mailto:sales@...ys.de Web: www.gdsys.de
--------------------------------------------------------------------------
Geschaeftsfuehrer: 
Udo Guntermann - Martin Drunck - Reiner Ruelmann - Klaus Tocke
HRB 2884, Amtsgericht Siegen - WEEE-Reg.-Nr. DE30763240
USt.-Id.-Nr. DE 126575222 - Steuer-Nr. 342 / 5835 / 1041
--------------------------------------------------------------------------
DQS-zertifiziert nach ISO 9001:2008
--------------------------------------------------------------------------


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