Bug 92023 - [kernel] 'options DEVICE_POLLING' makes loadavg wrong
Summary: [kernel] 'options DEVICE_POLLING' makes loadavg wrong
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-19 21:30 UTC by Joerg Lehners
Modified: 2017-07-15 19:00 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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