Bug 114722

Summary: [acpi] [patch] Nearly duplicate p-state entries reported
Product: Base System Reporter: Bryan Venteicher <mr.kodaik>
Component: kernAssignee: freebsd-acpi (Nobody) <acpi>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Bryan Venteicher 2007-07-19 06:10:01 UTC
I recently purchased a Lenovo T16 laptop with a 2.0GHz Core2Duo (T7300) processor. ACPI reports nearly identical Px states:
dev.est.0.freq_settings: 2001/35000 2000/35000 1600/25000 1200/16000 800/14000

cpufreq then turns the states into the following frequencies:
dev.cpu.0.freq_levels: 2001/35000 2000/35000 1750/30625 1600/25000 1400/21875 1200/16000 1050/14000 900/12000 800/14000 700/12250 600/10500 500/8750 400/7000 300/5250

If powerd attempts to lower the processor frequency when it at the maximum, the change is rejected since the frequencies are so close:
idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz
idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz
idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz
idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz
^Z
Suspended

Manually changing the frequency to a lower value allows powerd to do its thing:
agonize# sysctl dev.cpu.0.freq=1600
dev.cpu.0.freq: 2001 -> 1600
agonize# fg
powerd -v
idle time > 90%, decreasing clock speed from 1600 MHz to 1400 MHz
idle time > 90%, decreasing clock speed from 1400 MHz to 1200 MHz
idle time > 90%, decreasing clock speed from 1200 MHz to 1050 MHz
idle time > 90%, decreasing clock speed from 1050 MHz to 900 MHz
idle time > 90%, decreasing clock speed from 900 MHz to 800 MHz
idle time > 90%, decreasing clock speed from 800 MHz to 700 MHz
idle time > 90%, decreasing clock speed from 700 MHz to 600 MHz
idle time > 90%, decreasing clock speed from 600 MHz to 500 MHz
idle time > 90%, decreasing clock speed from 500 MHz to 400 MHz
idle time > 90%, decreasing clock speed from 400 MHz to 300 MHz
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2007-07-19 06:56:54 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-acpi

Over to maintainer(s).
Comment 2 Simon Barner freebsd_committer freebsd_triage 2007-10-31 19:03:59 UTC
I can confirm that this patch makes powered work in adaptive mode on
my Lenovo T61.

Simon
Comment 3 njl freebsd_committer freebsd_triage 2008-01-16 01:04:56 UTC
State Changed
From-To: open->closed

Patch committed as rev 1.29 kern_cpu.c and will be MFCd for 7.0
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-01-16 01:05:28 UTC
njl         2008-01-16 01:05:22 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_cpu.c 
  Log:
  Remove duplicate cpufreq levels, i.e. ones that are within 25 Mhz of each
  other.  The first one survives, the rest are removed.  So far, it appears
  only some acpi_perf(4) BIOS tables have these invalid states, but address
  this in the core to be sure to handle other potential driver data.
  
  PR:             kern/114722
  Tested by:      stefan.lambrev / moneybookers.com
  MFC after:      3 days
  
  Revision  Changes    Path
  1.29      +11 -0     src/sys/kern/kern_cpu.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"