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:	Wed, 04 May 2011 15:47:17 +0200
From:	Clemens Ladisch <clemens@...isch.de>
To:	"Eibach, Dirk" <Eibach@...ys.de>
CC:	linux-kernel@...r.kernel.org
Subject: Re: msleep() an load average

Eibach, Dirk wrote:
> 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.

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


Regards,
Clemens
--
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