linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Prarit Bhargava <prarit@redhat.com>
Cc: Jacob Tanenbaum <jtanenba@redhat.com>, linux-pm@vger.kernel.org
Subject: Re: cpupower reports uninitialized values for offline cpus
Date: Wed, 30 Sep 2015 18:23:58 +0200	[thread overview]
Message-ID: <2397035.37ChXSYNtU@skinner> (raw)
In-Reply-To: <560AF3CB.1090401@redhat.com>

On Tuesday, September 29, 2015 04:25:47 PM Prarit Bhargava wrote:
> On 09/29/2015 02:58 PM, Jacob Tanenbaum wrote:
> > Hi guys,
> > 
> > I have found a bug in the cpupower tool. In the most recent pull of
> > linus's tree cpupower reports bogus information for offlined cpus.
...
> Thomas,
> 
> I'm not sure I see any benefit in reporting the offline cpu status here.
There have been discussions to use CPU offlining as a power saving mechanism.
This is afaik no real option on x86, at least not too frequent, but it could
be on other archs?
So the info would be nice to have...

> We
> could I suppose output a message at the beginning of the output to indicate
> that some cpus have been hotplugged, but I'm not sure that is even
> necessary.
Yep, just that people do not complain that cores are missing...
May make sense.
 
> I would prefer changing cpupower to reporting only online CPUs, but there's
> probably some situation I'm unaware of that we need to report offline cpu
> status.
> >   2. When printing the results check if the cpu is offline and if it is
> >   obscure> 
> > the incorrect information and change the cpu->pkg
> >      value to reflect all sockets with at least one online cpu.

Hm, not sure how difficult to implement that is right now, but IMO info should
be set to -1 if the files do not exist or initialized with -1.
In this case there is no sane info to show and the cores need not to show up.

> 
> This is papering over the issue IMO, but still an option.
> 
> >   3. Change the sysfs to retain topology data for offlined cpus, may
> >   require

I had a quick look. I think this could be done.
/sys/devices/system/cpu/cpu*/cpuidle
also is kept, not sure why, because I cannot see any advantage to access
this info on an offlined CPU.

But reading the topology of offlined CPUs makes sense.
Argh, but yes. For real on-/offlining this is hard...

    Thomas

  reply	other threads:[~2015-09-30 16:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 18:58 cpupower reports uninitialized values for offline cpus Jacob Tanenbaum
2015-09-29 20:25 ` Prarit Bhargava
2015-09-30 16:23   ` Thomas Renninger [this message]
2015-09-30 18:25     ` Prarit Bhargava
2015-10-01 12:29       ` Thomas Renninger
2015-10-01 13:11         ` Prarit Bhargava

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=2397035.37ChXSYNtU@skinner \
    --to=trenn@suse.de \
    --cc=jtanenba@redhat.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=prarit@redhat.com \
    /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).