Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Guenter Roeck
On 04/06/2016 10:05 PM, Huang Rui wrote: On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote: On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote: +static void do_read_registers_on_cu(void *_data) +{ + struct fam15h_power_data *data = _data; + int cpu, cu; + +

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Guenter Roeck
On 04/06/2016 10:05 PM, Huang Rui wrote: On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote: On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote: +static void do_read_registers_on_cu(void *_data) +{ + struct fam15h_power_data *data = _data; + int cpu, cu; + +

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote: > On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote: > > > > +static void do_read_registers_on_cu(void *_data) > > +{ > > + struct fam15h_power_data *data = _data; > > + int cpu, cu; > > + > > + cpu =

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote: > On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote: > > > > +static void do_read_registers_on_cu(void *_data) > > +{ > > + struct fam15h_power_data *data = _data; > > + int cpu, cu; > > + > > + cpu =

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Guenter Roeck
On Wed, Apr 06, 2016 at 03:44:11PM +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

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Guenter Roeck
On Wed, Apr 06, 2016 at 03:44:11PM +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

[PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
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.

[PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
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.