Bug 528945 - Powertop neglects cstate info for wakeup calculation
Summary: Powertop neglects cstate info for wakeup calculation
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: powertop
Version: 14
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-14 13:07 UTC by Phil Knirsch
Modified: 2015-03-05 01:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-15 10:46:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix for missing cstate check for totalevents recalculation for wakeups (697 bytes, application/x-php)
2009-10-14 13:08 UTC, Phil Knirsch
no flags Details

Description Phil Knirsch 2009-10-14 13:07:27 UTC
Description of problem:

During some tests on heavily loaded systems we've observed some strange behaviour:

Instead of basically never (or as good as never) waking up from idle we sometimes go output like this:

Wakeups-from-idle per second : 1072.2 interval: 60.0s

which clearly isn't possible as the system is guaranteed to be 100% busy and no core ever leaves C1, double checked it with cpuidle data.

After some investigation i've found the problem:

In case no events happened (totalevents == 0) the information is instead grabbed from timerstats.

Problem is that this should only happen if the CPU doesn't have multiple C-states, which is checked for at other places where it matters but not where the wakeup from idle events are grabbed again.

The fix is therefore to just do the same check as at the other places and do a

  if (totalevents == 0&&  maxcstate<= 1)

instead.

Attached you'll find the patch that fixes that.

The end result is that in case of no single event happening no wakeup from idle output will be shown anymore (which is the correct behaviour).


Version-Release number of selected component (if applicable):

powertop-1.11-3.fc12

How reproducible:

Always on fully loaded systems (need to wait a few updates occasionally as the scheduler might put 1 core into idle for 1 timeslice which results in a very low (and correct) wakeup-from-idle counter).

Steps to Reproduce:
1. Run the simple C program as many times in the background as you have cores to put the machine under full load: main() {while (1);}
2. Run powertop
3. Wait till you see lots of wakeups from idle on a 100% busy machine
  
Actual results:

Wakeups-from-idle per second : 1072.2 interval: 60.0s

Expected results:

Maximum 1-2 wakups-from-idle per second or no line at all if no wakeups happened.

Additional info:

Patch with fix is attached.

Comment 1 Phil Knirsch 2009-10-14 13:08:26 UTC
Created attachment 364748 [details]
Fix for missing cstate check for totalevents recalculation for wakeups

Comment 2 Bug Zapper 2009-11-16 13:40:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2010-11-04 09:27:31 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Fedora Admin XMLRPC Client 2010-11-18 14:42:35 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Jaroslav Škarvada 2010-12-15 10:46:12 UTC
It was rejected by upstream with the following comment from Arjan van de Ven:

> this does not look correct; sorry.
>
> the real fix is actually a radical change on how things are counted...
> which is done in the powertop 2.x git tree.

Thus the rebase to 2.x in the future should fix it. I do not want to differ from upstream in 1.x branch. That's why I am closing this as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.