Re: [PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-29 Thread Borislav Petkov
On Tue, Mar 29, 2016 at 11:28:48AM +0800, Huang Rui wrote: > I checked with HW designer, milliseconds is also a reasonable interval > of acc power. And I cannot set too long here, because several seconds > will cause the read function to hang for that period of time. Exactly this justification sho

Re: [PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-28 Thread Huang Rui
On Mon, Mar 28, 2016 at 11:33:27AM +0200, Borislav Petkov wrote: > On Mon, Mar 28, 2016 at 01:32:14PM +0800, Huang Rui wrote: > > > > return 0; > > @@ -330,6 +446,9 @@ static int fam15h_power_init_data(struct pci_dev *f4, > > > > data->max_cu_acc_power = tmp; > > > > + /* set defaul

Re: [PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-28 Thread Borislav Petkov
On Mon, Mar 28, 2016 at 01:32:14PM +0800, Huang Rui wrote: > This patch introduces an algorithm that computes the average power by > reading a delta value of “core power accumulator” register during > measurement interval, and then dividing delta value by the length of > the time interval. > > Use

[PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-27 Thread Huang Rui
This patch introduces an algorithm that computes the average power by reading a delta value of “core power accumulator” register during measurement interval, and then dividing delta value by the length of the time interval. User is able to use power1_average entry to measure the processor power co