Bug 92023

Summary: [kernel] 'options DEVICE_POLLING' makes loadavg wrong
Product: Base System Reporter: Joerg Lehners <Joerg.Lehners>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: jpaetzel
Priority: Normal    
Version: 6.0-STABLE   
Hardware: Any   
OS: Any   

Description Joerg Lehners 2006-01-19 21:30:04 UTC
	Add the line
		options        DEVICE_POLLING
	to the kernel config file, compile and boot this kernel,
	start one program like 'main () { while (1) { } }' on the otherwise
	idle machine and watch the load avg. climbing above 1 and eventually
	reaching 2.
	For the counter test remove the options DEVICE_POLLING line
	and watch the load avg. reaching 1 for the same test.

Fix: 

Don't know, I'm no kernel hacker yet.
How-To-Repeat: 	
	See above
Comment 1 Harrison Grundy 2007-03-17 09:38:44 UTC
This would appear to be unavoidable with polling, because of what the 
load average represents. Since it only shows the number of things 
waiting to run (or, number of things on the run queue),  polling would 
be expected to cause this behavior.
Comment 2 Bruce Evans 2007-03-17 16:45:06 UTC
On Sat, 17 Mar 2007, Harrison Grundy wrote:

> This would appear to be unavoidable with polling, because of what the
> load average represents. Since it only shows the number of things
> waiting to run (or, number of things on the run queue),  polling would
> be expected to cause this behavior.

This behaviour (load average 2 with just 1 hog process) happens with
polling configured on no devices, and even with no devices capable of
supporting polling, but misbehaviour doesn't happen with 0 hog processes
(then the load average is 0).  Why would polling be expected to do
that?

I didn't know that polling is what causes this.  It is very old
misbehaviour (happens in pre-5.2).

Bruce