All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandra Yates <alexandra.yates at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [RESEND PATCH] powertop: fix erroneous C state detection on ARM
Date: Thu, 17 Sep 2015 17:22:10 -0700	[thread overview]
Message-ID: <55FB5932.6040603@linux.intel.com> (raw)
In-Reply-To: 20150707150433.GA4935@red-moon

[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]

This patch was added to the current powertop.rc1
AY

On 07/07/2015 08:04 AM, Lorenzo Pieralisi wrote:
> On Mon, Jun 15, 2015 at 10:57:29AM +0100, Lorenzo Pieralisi wrote:
>> When the kernel is configured with CONFIG_CPU_IDLE_MULTIPLE_DRIVERS,
>> the cpuidle directory contains a "driver" subdirectory that confuses
>> the current code parsing the C states on ARM platforms, ending up
>> with a C state entry corresponding to the actual driver name instead
>> of a proper C state entry.
>>
>> This patch fixes the code by stopping the parsing if the files that
>> characterise the C states (ie usage) are not found in the respective:
>>
>> /sys/devices/system/cpu/cpuX/cpuidle
>>
>> subdirectory containing C states information.
>>
>> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
>> Tested-by: Kevin Hilman <khilman(a)linaro.org>
>> ---
>> Alexandra, Arjan,
>>
>> previous posting here:
>>
>> https://lists.01.org/pipermail/powertop/2014-December/001724.html
>>
>> Please consider pulling this patch.
> Gentle ping.
>
> Thanks,
> Lorenzo
>
>> Thanks,
>> Lorenzo
>>
>>   src/cpu/cpu_linux.cpp | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/cpu/cpu_linux.cpp b/src/cpu/cpu_linux.cpp
>> index e1ff165..78fd2d3 100644
>> --- a/src/cpu/cpu_linux.cpp
>> +++ b/src/cpu/cpu_linux.cpp
>> @@ -83,7 +83,8 @@ void cpu_linux::parse_cstates_start(void)
>>   		if (file) {
>>   			file >> usage;
>>   			file.close();
>> -		}
>> +		} else
>> +			continue;
>>   
>>   		sprintf(filename + len, "/%s/time", entry->d_name);
>>   
>> @@ -172,7 +173,8 @@ void cpu_linux::parse_cstates_end(void)
>>   		if (file) {
>>   			file >> usage;
>>   			file.close();
>> -		}
>> +		} else
>> +			continue;
>>   
>>   		sprintf(filename + len, "/%s/time", entry->d_name);
>>   
>> -- 
>> 1.9.1
>>

-- 
Thank you,
<Alexandra>


             reply	other threads:[~2015-09-18  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18  0:22 Alexandra Yates [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-09-18 10:23 [Powertop] [RESEND PATCH] powertop: fix erroneous C state detection on ARM Lorenzo Pieralisi
2015-07-07 15:04 Lorenzo Pieralisi
2015-06-15  9:57 Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FB5932.6040603@linux.intel.com \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.