Bug 121768 - [cpufreq] cpufreq module RELENG_6 -> 7 regressions on ASUS M5A notebook [regression]
Summary: [cpufreq] cpufreq module RELENG_6 -> 7 regressions on ASUS M5A notebook [regr...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-16 20:20 UTC by Dmitry Pryanishnikov
Modified: 2017-12-31 22:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Pryanishnikov 2008-03-16 20:20:00 UTC

ASUS M5A notebook boots with CPU frequency 1862 MHz in AC mode and
800 MHz in battery mode. Operation in both modes has gotten broken
(in different ways) after upgrade from RELENG_6 (23.05.07)
to RELENG_7 (15.03.08).


Booting in AC mode with cpufreq module under RELENG_7 makes all timed sleeps
(e.g. sleep(1)) much longer than requested:

    # time sleep 100
    real    3m53.520s
    user    0m0.000s
    sys     0m0.000s

That's 233.52s instead of 100. Note that the following line gets printed
during the boot:

dev.cpu.0.freq: 798 -> 1862

Thus timed sleep gets longer in ratio of these two CPU frequencies:

    1862 / 798 = 2.3333333

There was no such problem under RELENG_6: during the boot I saw

dev.cpu.0.freq: 1862 -> 1862

and timed sleep lengths were correct.


Booting in battery mode with cpufreq module under RELENG_7 doesn't
break timed sleep, however available CPU frequencies get limited from

dev.cpu.0.freq_levels: 1862/27000 1629/23625 1596/23000 1396/20125
1197/17250 997/14375 798/13000 698/11375 598/9750 498/8125 399/6500
299/4875 199/3250 99/1625

in AC mode to just

dev.cpu.0.freq_levels: 794/-1 694/-1 595/-1 496/-1 397/-1 297/-1 198/-1 99/-1

So even after powering notebook from AC I can't use CPU frequencies
higher than 794 MHz. Note that under RELENG_6 available frequencies were

dev.cpu.0.freq_levels: 1862/27000 1629/23625 1596/23000 1396/20125 1330/20000
1163/17500 1064/17000 931/14875 798/13000 698/11375 598/9750 498/8125 399/6500
299/4875 199/3250 99/1625

regardless of the boot mode (AC/battery).

Fix: 

To work around the timed sleep problem, don't load cpufreq module.
This changes output during the boot to

dev.cpu.0.freq: 1852 -> 1852

and restores the exactness on timed sleeps.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:38 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped