From: "Doug Smythies" <dsmythies@telus.net>
To: "'Len Brown'" <lenb@kernel.org>,
"'Antti Laakso'" <antti.laakso@linux.intel.com>
Cc: "'Len Brown'" <len.brown@intel.com>, <linux-pm@vger.kernel.org>,
"Doug Smythies" <dsmythies@telus.net>,
"'Rafael J. Wysocki'" <rafael@kernel.org>
Subject: RE: [PATCH 09/10] tools/power turbostat: Print cpuidle information
Date: Fri, 20 Mar 2020 08:22:16 -0700 [thread overview]
Message-ID: <000001d5fecb$594be560$0be3b020$@net> (raw)
In-Reply-To: <7c3808082a40a96e95808864fe814b4e68238a46.1584679387.git.len.brown@intel.com>
Hi Len, Antti,
I didn't actually try it yet.
This reply is just from reading the patches.
On 2020.03.19 22:23 Len Brown wrote:
> From: Antti Laakso <antti.laakso@linux.intel.com>
>
> Print cpuidle driver and governor.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> Signed-off-by: Len Brown <len.brown@intel.com>
...
> + sprintf(path, "/sys/devices/system/cpu/cpuidle/current_governor_ro");
> + input = fopen(path, "r");
> + if (input == NULL) {
> + fprintf(outf, "NSFOD %s\n", path);
> + return;
> + }
> + if (!fgets(cpuidle_buf, sizeof(cpuidle_buf), input))
> + err(1, "%s: failed to read file", path);
> + fclose(input);
> +
> + fprintf(outf, "cpuidle governor: %s", cpuidle_buf);
> +
There is a problem here if one has the 'cpuidle_sysfs_switch'
in the kernel command line (which I do always), because that
(not) variable name changes as a function of the switch [2].
I have:
$ grep . /sys/devices/system/cpu/cpuidle/*
/sys/devices/system/cpu/cpuidle/available_governors:ladder menu teo
/sys/devices/system/cpu/cpuidle/current_driver:intel_idle
/sys/devices/system/cpu/cpuidle/current_governor:teo
And in grub:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 consoleblank=300 intel_pstate=passive cpuidle_sysfs_switch cpuidle.governor=teo"
Note that there was talk of getting rid of the command line switch [1 at the end], which would be great.
Copied below:
On 2019.09.02 14:59 Rafael wrote:
> FWIW, I've been thinking about getting rid of the cpuidle_sysfs_switch
> command line option and always allowing user space to switch cpuidle
> governors at run time. At least I see no reason why that would not
> work ATM.
[1] https://marc.info/?l=linux-pm&m=156746153919195&w=2
[2] Documentation/admin-guide/pm/cpuidle.rst (search for 'current_governor_ro')
... Doug
next prev parent reply other threads:[~2020-03-20 15:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 5:22 turbostat update to version 20.03.19 Len Brown
2020-03-20 5:22 ` [PATCH 01/10] tools/power turbostat: Support Cometlake Len Brown
2020-03-20 5:22 ` [PATCH 02/10] tools/power turbostat: Fix gcc build warnings Len Brown
2020-03-20 5:22 ` [PATCH 03/10] tools/power turbostat: Support Tiger Lake Len Brown
2020-03-20 5:22 ` [PATCH 04/10] tools/power turbostat: Support Ice Lake server Len Brown
2020-03-20 5:22 ` [PATCH 05/10] tools/power turbostat: Support Jasper Lake Len Brown
2020-03-20 5:22 ` [PATCH 06/10] tools/power turbostat: Support Elkhart Lake Len Brown
2020-03-20 5:22 ` [PATCH 07/10] tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks Len Brown
2020-03-20 5:22 ` [PATCH 08/10] tools/power turbostat: Fix 32-bit capabilities warning Len Brown
2020-03-25 0:50 ` Doug Smythies
2020-03-25 0:54 ` Brown, Len
2020-03-20 5:22 ` [PATCH 09/10] tools/power turbostat: Print cpuidle information Len Brown
2020-03-20 15:22 ` Doug Smythies [this message]
2020-03-21 4:52 ` Len Brown
2020-03-20 5:22 ` [PATCH 10/10] turbostat: update version Len Brown
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='000001d5fecb$594be560$0be3b020$@net' \
--to=dsmythies@telus.net \
--cc=antti.laakso@linux.intel.com \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).