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] [day] [month] [year] [list]
Message-ID: <48D3D52125C49B43AE880038E2E5314BB5BEA0@SRV101.gdsys.de>
Date:	Wed, 4 May 2011 16:47:44 +0200
From:	"Eibach, Dirk" <Eibach@...ys.de>
To:	"Clemens Ladisch" <clemens@...isch.de>
Cc:	"Jiri Slaby" <jirislaby@...il.com>, <linux-kernel@...r.kernel.org>
Subject: RE: msleep() an load average

 
> > > Uninterruptible sleeps count as I/O load.
> > 
> > Is there any practical reason behind this or was it just an 
> igenious 
> > invention to annoy those smug userspace developers?
> 
> Historically, uninterruptible sleeps were the best way to 
> detect I/O load.  Furthermore, a process that is doing I/O is 
> very likely to continue running soon, while other sleeps are 
> more likely to indicate that the process is waiting for some 
> event to wake it up to begin doing something, so this better 
> predicts CPU load.  Finally, a busy device is likely to 
> prevent other programs from running well, so it makes sense 
> to count this against the load.
> 
> msleep() is commonly used to handle device communication 
> delays, which is essentially the same case as waiting for 
> disk I/O.  It might be possible to introduce some new flags 
> or functions to allow long uninterruptible sleeps that do not 
> affect the load, but this has not been necessary so far 
> because knowledge of this quirk of the load heuristic is 
> necessary for every great kernel hacker.  ;-)

So summarizing we could say that semantics for signalling I/O load to
loadavg are historically crippled and msleep() should be avoided if you
don't want to mess up loadavg.
In addition I realize that studying LDD does not make you a great kernel
hacker ;)

Cheers
Dirk


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