Bug 125141 - powerd(8) [patch] change request to adapt SMP environment.
Summary: powerd(8) [patch] change request to adapt SMP environment.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-01 11:50 UTC by Yoshisato Yanagisawa
Modified: 2008-11-18 15:54 UTC (History)
0 users

See Also:


Attachments
file.diff (1.33 KB, patch)
2008-07-01 11:50 UTC, Yoshisato Yanagisawa
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshisato Yanagisawa 2008-07-01 11:50:03 UTC
	Since an idle time got by "sysctl kern.cp_time" is the average
	idle time of all the CPUs, powerd will not increase frequency
	when one of the CPUs is busy and the others are not.
	I guess many people will recognize this problem if they uses
	the system that has more than 4 CPUs because the default
	value of the -r option is 65.

Fix: Consider the number of CPUs.  I made a following patch to recognize
	the number of CPUs.

	Another approach to solve this problem is using idle time of
	the process [idle:cpu0], [idle:cpu1], [idle:cpu2], and [idle:cpu3]
	instead of sysctl kern.cp_time.  However, since it requires drastic
	change of code, I avoided it.
How-To-Repeat: 	Just run powerd on the system which has more than 4 CPUs,
	and make one of the CPUs busy while the others are idle.
Comment 1 Yoshisato Yanagisawa 2008-07-01 14:07:59 UTC
Since the structure of patch is broken down on this web page, I also put
the patch to the following:
http://www.pcc-software.org/~osho/powerd.patch
Comment 2 Alexander Motin freebsd_committer freebsd_triage 2008-11-18 15:53:25 UTC
State Changed
From-To: open->closed

Fixed in -CURRENT by r185050.