public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Huang Rui <ray.huang@amd.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <jdelvare@suse.de>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	spg_linux_kernel@amd.com
Subject: Re: [PATCH v5 2/6] hwmon: (fam15h_power) Add compute unit accumulated power
Date: Tue, 29 Mar 2016 09:31:58 +0200	[thread overview]
Message-ID: <20160329073158.GC3408@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160328092952.GB26651@pd.tnic>

On Mon, Mar 28, 2016 at 11:29:52AM +0200, Borislav Petkov wrote:
> I think you want something like this: iterate over each core and put one
> of them into the mask.
> 
> 	core = -1;
> 
> 	for_each_online_cpu(cpu) {
> 		this_core = topology_core_id(cpu);
> 
> 		if (this_core == core)
> 			continue;
> 
> 		core = this_core;
> 
> 		/* get any CPU on this compute unit */
> 		cpumask_set_cpu(cpumask_any(topology_sibling_cpumask(cpu)), mask);
> 	}

This will not in fact work for Intel, nor if I manage to one day
randomize our CPU numbers on AMD.

  parent reply	other threads:[~2016-03-29  7:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-28  5:32 [PATCH v5 0/6] hwmon: (fam15h_power) Introduce an accumulated power reporting algorithm Huang Rui
2016-03-28  5:32 ` [PATCH v5 1/6] hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence Huang Rui
2016-03-28  8:59   ` Borislav Petkov
2016-03-28  5:32 ` [PATCH v5 2/6] hwmon: (fam15h_power) Add compute unit accumulated power Huang Rui
2016-03-28  9:29   ` Borislav Petkov
2016-03-29  3:02     ` Huang Rui
2016-03-29  7:31     ` Peter Zijlstra [this message]
2016-03-29  7:57       ` Borislav Petkov
2016-03-28  5:32 ` [PATCH v5 3/6] hwmon: (fam15h_power) Add ptsc counter value for " Huang Rui
2016-03-28  5:32 ` [PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm Huang Rui
2016-03-28  9:33   ` Borislav Petkov
2016-03-29  3:28     ` Huang Rui
2016-03-29  7:25       ` Borislav Petkov
2016-03-28  5:32 ` [PATCH v5 5/6] hwmon: (fam15h_power) Add documentation for TDP and accumulated power algorithm Huang Rui
2016-03-28  5:32 ` [PATCH v5 6/6] hwmon: (fam15h_power) Add platform check function Huang Rui

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=20160329073158.GC3408@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=jdelvare@suse.de \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ray.huang@amd.com \
    --cc=spg_linux_kernel@amd.com \
    --cc=tglx@linutronix.de \
    /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