[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <562A3812.6060805@roeck-us.net>
Date: Fri, 23 Oct 2015 06:37:22 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Borislav Petkov <bp@...e.de>, Huang Rui <ray.huang@....com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jean Delvare <jdelvare@...e.de>,
Andy Lutomirski <luto@...capital.net>,
Andreas Herrmann <herrmann.der.user@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
John Stultz <john.stultz@...aro.org>,
Frédéric Weisbecker <fweisbec@...il.com>,
lm-sensors@...sensors.org, linux-kernel@...r.kernel.org,
x86@...nel.org,
Andreas Herrmann <herrmann.der.user@...glemail.com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@....com>,
Fengguang Wu <fengguang.wu@...el.com>,
Aaron Lu <aaron.lu@...el.com>, Tony Li <tony.li@....com>
Subject: Re: [PATCH v2 05/10] hwmon: (fam15h_power) Add compute unit
accumulated power
On 10/23/2015 06:27 AM, Borislav Petkov wrote:
> On Tue, Oct 20, 2015 at 10:28:24AM +0800, Huang Rui wrote:
>> This patch adds a member in fam15h_power_data which specifies the
>> compute unit accumulated power. It adds do_read_registers_on_cu to do
>> all the read to all MSRs and run it on one of the online cores on each
>> compute unit with smp_call_function_many(). This behavior can decrease
>> IPI numbers.
>>
>> Suggested-by: Borislav Petkov <bp@...en8.de>
>> Signed-off-by: Huang Rui <ray.huang@....com>
>> Cc: Guenter Roeck <linux@...ck-us.net>
>> Cc: Peter Zijlstra <peterz@...radead.org>
>> Cc: Ingo Molnar <mingo@...nel.org>
>> ---
>> drivers/hwmon/fam15h_power.c | 68 +++++++++++++++++++++++++++++++++++++++++++-
>> 1 file changed, 67 insertions(+), 1 deletion(-)
>>
[ ... ]
>> +static void do_read_registers_on_cu(void *_data)
>> +{
>> + struct fam15h_power_data *data = _data;
>> + int cpu, cu, cores_per_cu;
>> +
>> + cpu = smp_processor_id();
>> +
>> + cores_per_cu = amd_get_cores_per_cu();
>> + cu = cpu / cores_per_cu;
>> +
>> + WARN_ON(rdmsrl_safe(MSR_F15H_CU_PWR_ACCUMULATOR,
>> + &data->cu_acc_power[cu]));
>
> I guess the WARN_ON's here should be WARN_ON_ONCE() - otherwise dmesg is
> filling up very quickly.
>
I don't really understand why WARN_ON (or WARN_ON_ONCE)
would be warranted here in the first place.
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists