Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2008 22:06:27 +0200 (EET)
From:      Dmitry Pryanishnikov <lynx.ripe@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/121768: cpufreq module RELENG_6 -> 7 regressions on ASUS M5A notebook
Message-ID:  <200803162006.m2GK6RY3090565@admdeps.euinf.net>
Resent-Message-ID: <200803162020.m2GKK117085050@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121768
>Category:       kern
>Synopsis:       cpufreq module RELENG_6 -> 7 regressions on ASUS M5A notebook
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 16 20:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Pryanishnikov
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
Home
>Environment:
System: FreeBSD notebook.homenet 7.0-STABLE FreeBSD 7.0-STABLE #0: Sun Mar 16 16:43:53 EET 2008 root@notebook.homenet:/usr/obj/data/RELENG_7/src.080315/sys/lynx i386
Hardware: ASUS M5A notebook
CPU: Intel(R) Pentium(R) M processor 1.86GHz (1862.01-MHz 686-class CPU)

>Description:


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).


>How-To-Repeat:
>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.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803162006.m2GK6RY3090565>