← Back to team overview

kernel-packages team mailing list archive

[Bug 1136700] Re: PROBLEM: cpufreq ondemand governor problem

 

On Tue, Aug 6, 2013 at 7:26 PM, Jim Hochschild <illini_80@xxxxxxxxx> wrote:
> [1.] One line summary of the problem:
>
> cpufreq ondemand governor problem

Sorry for being too late brother.. I went through your mail when you sent it
for the first time and thought I will look into it and then got busy, though it
was on my todo list :)

Finally came back to this.. I understand and accept the problem you faced.
Yes that's a issue.

I am sure you want to have a look at this:

commit cffe4e0e7413eb29fb8bd035c8b12b33a4b8522a
Author: Stratos Karafotis <stratosk@xxxxxxxxxxxx>
Date:   Wed Jun 5 19:01:50 2013 +0300

    cpufreq: Remove unused function __cpufreq_driver_getavg()

    The target frequency calculation method in the ondemand governor has
    changed and it is now independent of the measured average frequency.
    Consequently, the __cpufreq_driver_getavg() function and getavg
    member of struct cpufreq_driver are not used any more, so drop them.

    [rjw: Changelog]
    Signed-off-by: Stratos Karafotis <stratosk@xxxxxxxxxxxx>
    Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

 drivers/cpufreq/cpufreq.c | 12 ------------
 1 file changed, 12 deletions(-)

commit 61c63e5ed3b9c472899d7152e961f2ffaafcf5a0
Author: Stratos Karafotis <stratosk@xxxxxxxxxxxx>
Date:   Wed Jun 5 19:01:42 2013 +0300

    cpufreq: Remove unused APERF/MPERF support

    The target frequency calculation method in the ondemand governor has
    changed and it is now independent of the measured average frequency.
    Consequently, the APERF/MPERF support in cpufreq is not used any
    more, so drop it.

    [rjw: Changelog]
    Signed-off-by: Stratos Karafotis <stratosk@xxxxxxxxxxxx>
    Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

 drivers/cpufreq/Makefile       |  2 +-
 drivers/cpufreq/acpi-cpufreq.c |  5 -----
 drivers/cpufreq/mperf.c        | 51
---------------------------------------------------
 drivers/cpufreq/mperf.h        |  9 ---------
 4 files changed, 1 insertion(+), 66 deletions(-)


And so your problem will go away from 3.12 (Its already queued for
next kernel release.)..

Thanks for reporting this issue.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1136700

Title:
  cpufreq ondemand governor problem

Status in “linux” package in Ubuntu:
  Confirmed

Bug description:
  I'm seeing a problem with the cpufreq ondemand governor in 12.04 32-bit.  When I
  load one core of my Intel i5-3570 processor, instead of switching to a steady
  3.8GHz clock as I would expect, the clock actually toggles between 1.6GHz (min
  frequency) and 3.8GHz (max frequency),  even though the core is maxed out at
  100%.  I can increase the time it spends at 3.8GHz by increasing the
  sampling_down_factor tuning parameter, but it still switches back to 1.6GHz,
  albeit less frequently.  I've also tried 12.10 32-bit and it has the same
  problem.  However, 12.04 and 12.10 64-bit do not have the problem.  I decided to
  look into this a little further, so I copied the source code for the ondemand
  governor module and added a little debug code to see what was going on.  I found
  that the __cpufreq_driver_getavg function call was sometimes returning a value
  which was several orders of magnitude too small.  For example:

  [20174.251637] mygov: freq_avg(2) = 158     freq_cur = 3801000
  [20174.251642] mygov: freq_avg(0) = 4149919 freq_cur = 1600000
  [20174.251645] mygov: freq_avg(1) = 4149919 freq_cur = 1600000
  [20174.251647] mygov: freq_avg(3) = 4120224 freq_cur = 1600000

  As you can see, the return value freq_avg is very small for core 2, which is the
  maxed out core.  This value is calculated in mperf.c using 32-bit unsigned
  integers (in the 32-bit OS case) and it includes a final 10-bit right shift.  As
  you can see, the normal return value is greater than 4meg, so before the shift it
  is greater then 4gig, right at the limit of a 32-bit integer.  I believe that the
  erroneous return values are due to 32-bit overflow in the average frequency
  calculation.  However, in the 64-bit OS the calculation uses 64 bits since one of
  the variables is declared as unsigned long, so there is no overflow.  Note that
  slower processors wouldn't show this problem since the average frequency numbers
  would be smaller.  Also, I have noticed that if I load 3 or 4 cores, the problem
  disappears.  This is because the processor maximum clock frequency is
  automatically reduced to 3.7GHz or 3.6GHz respectively, and this frequency
  reduction is enough to avoid overflow.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: linux-image-3.2.0-38-generic-pae 3.2.0-38.61
  ProcVersionSignature: Ubuntu 3.2.0-38.61-generic-pae 3.2.37
  Uname: Linux 3.2.0-38-generic-pae i686
  AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
  ApportVersion: 2.0.1-0ubuntu17.1
  Architecture: i386
  ArecordDevices:
   **** List of CAPTURE Hardware Devices ****
   card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
     Subdevices: 1/1
     Subdevice #0: subdevice #0
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC0:  jim        2351 F.... pulseaudio
                        jim        3333 F.... xmms
   /dev/snd/pcmC0D0p:   jim        2351 F...m pulseaudio
  CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
  Card0.Amixer.info:
   Card hw:0 'AudioPCI'/'Ensoniq AudioPCI ENS1371 at 0xd000, irq 18'
     Mixer name	: 'SigmaTel STAC9721,23'
     Components	: 'AC97a:83847609'
     Controls      : 36
     Simple ctrls  : 23
  Date: Thu Feb 28 18:49:55 2013
  HibernationDevice: RESUME=UUID=9c9d7935-45a9-4dae-8d56-b28be920ca4e
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
  IwConfig:
   lo        no wireless extensions.
   
   eth0      no wireless extensions.
  MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
  MarkForUpload: True
  ProcEnviron:
   TERM=xterm
   LC_COLLATE=POSIX
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/usr/bin/tcsh
  ProcFB:
   0 inteldrmfb
   1 VESA VGA
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-38-generic-pae root=UUID=8d75fd4b-1bf6-4edc-9f5b-57790e729fe1 ro vga=791 debug ignore_loglevel
  RelatedPackageVersions:
   linux-restricted-modules-3.2.0-38-generic-pae N/A
   linux-backports-modules-3.2.0-38-generic-pae  N/A
   linux-firmware                                1.79.1
  RfKill:
   
  SourcePackage: linux
  StagingDrivers: mei
  UpgradeStatus: No upgrade log present (probably fresh install)
  WifiSyslog:
   Feb 28 10:40:13 elrond NetworkManager[1083]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
   Feb 28 10:40:36 elrond NetworkManager[1083]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
   Feb 28 12:21:03 elrond NetworkManager[1083]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
   Feb 28 12:21:14 elrond NetworkManager[1083]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
   Feb 28 16:28:23 elrond NetworkManager[1083]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
  dmi.bios.date: 08/22/2012
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: F9
  dmi.board.asset.tag: To be filled by O.E.M.
  dmi.board.name: H77M-D3H
  dmi.board.vendor: Gigabyte Technology Co., Ltd.
  dmi.board.version: x.x
  dmi.chassis.asset.tag: To Be Filled By O.E.M.
  dmi.chassis.type: 3
  dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
  dmi.chassis.version: To Be Filled By O.E.M.
  dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF9:bd08/22/2012:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rnH77M-D3H:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
  dmi.product.name: To be filled by O.E.M.
  dmi.product.version: To be filled by O.E.M.
  dmi.sys.vendor: Gigabyte Technology Co., Ltd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1136700/+subscriptions