From: Huang Rui <ray.huang@amd.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
"Ingo Molnar" <mingo@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
"Robert Richter" <rric@kernel.org>,
Jacob Shin <jacob.w.shin@gmail.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
Kan Liang <kan.liang@intel.com>, <linux-kernel@vger.kernel.org>,
<spg_linux_kernel@amd.com>, <x86@kernel.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
Borislav Petkov <bp@alien8.de>,
"Fengguang Wu" <fengguang.wu@intel.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power reporting mechanism
Date: Fri, 4 Mar 2016 11:11:28 +0800 [thread overview]
Message-ID: <20160304031127.GB2791@hr-amur2> (raw)
In-Reply-To: <alpine.DEB.2.11.1603031850070.3597@nanos>
On Thu, Mar 03, 2016 at 06:57:53PM +0100, Thomas Gleixner wrote:
> On Fri, 4 Mar 2016, Huang Rui wrote:
> > On Thu, Mar 03, 2016 at 04:26:46PM +0100, Thomas Gleixner wrote:
> > > Why? You do a full for_each_online_cpu(i) loop after that, which does
> > > exactly the same thing, right?
> > >
> >
> > But looks like power_cpu_init cannot handle it if we don't take any
> > action here.
> >
> > e. g.
> > cpu_mask: 0000 and online mask: 1111 -> power_cpu_init(0) -> cpu_mask is still: 0000
> >
> > topology_sibling_cpumask(0): 0011
> > target: 1 (i. e. we cannot do cpumask_set_cpu(0, &cpu_mask))
>
> Fair enough, but then you don't need the power_cpu_init() call at all.
>
> But your loop does not cover anything beyond the first socket. So you need a
> separate init function which does:
>
> for_each_online_cpu(cpu) {
> target = cpumask_first(topology_sibling_cpumask(cpu));
> if (!cpumask_test_cpu(target, cpumask))
> cpumask_set_cpu(target, cpumask);
> }
>
Looks good. Thanks Thomas. Will update it.
Rui
prev parent reply other threads:[~2016-03-04 3:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 8:04 [PATCH v6 0/2] perf/x86/power: Introduce AMD accumlated " Huang Rui
2016-03-03 8:04 ` [PATCH v6 1/2] perf/x86: Export events_sysfs_show() Huang Rui
2016-03-03 8:04 ` [PATCH v6 2/2] perf/x86/amd/power: Add AMD accumulated power reporting mechanism Huang Rui
2016-03-03 8:50 ` Thomas Gleixner
2016-03-03 15:13 ` Huang Rui
2016-03-03 15:26 ` Thomas Gleixner
2016-03-03 16:18 ` Huang Rui
2016-03-03 17:57 ` Thomas Gleixner
2016-03-04 3:11 ` Huang Rui [this message]
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=20160304031127.GB2791@hr-amur2 \
--to=ray.huang@amd.com \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=acme@kernel.org \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=fengguang.wu@intel.com \
--cc=jacob.w.shin@gmail.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rric@kernel.org \
--cc=spg_linux_kernel@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®