Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-22 Thread Borislav Petkov
On Fri, Jan 22, 2016 at 04:04:40PM +0800, Huang Rui wrote: > OK, you're right. Peter, Boris, thanks for your information. > I might need look at topology deeper. :-) > > So how about below update: Please send a full patch, not those diffs ontop - I don't know about Peter but I absolutely can't gr

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-22 Thread Huang Rui
On Thu, Jan 21, 2016 at 05:59:58PM +0100, Borislav Petkov wrote: > On Thu, Jan 21, 2016 at 04:10:40PM +0100, Peter Zijlstra wrote: > > > > > + cpumask_clear(pmu->mask); > > > > > + cpumask_clear(pmu->tmp_mask); > > > > > > > > > > for (i = 0; i < cores_per_cu; i++) > > > > > +

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-21 Thread Borislav Petkov
On Thu, Jan 21, 2016 at 04:10:40PM +0100, Peter Zijlstra wrote: > > > > + cpumask_clear(pmu->mask); > > > > + cpumask_clear(pmu->tmp_mask); > > > > > > > > for (i = 0; i < cores_per_cu; i++) > > > > + cpumask_set_cpu(i, pmu->mask); > > > > > > > > + cpuma

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-21 Thread Peter Zijlstra
On Thu, Jan 21, 2016 at 11:24:14PM +0800, Huang Rui wrote: > On Thu, Jan 21, 2016 at 04:10:40PM +0100, Peter Zijlstra wrote: > > On Thu, Jan 21, 2016 at 10:42:35PM +0800, Huang Rui wrote: > > > > > @@ -164,14 +171,14 @@ static int pmu_event_add(struct perf_event > > > > > *event, int mode) > > > >

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-21 Thread Huang Rui
On Thu, Jan 21, 2016 at 04:10:40PM +0100, Peter Zijlstra wrote: > On Thu, Jan 21, 2016 at 10:42:35PM +0800, Huang Rui wrote: > > > > @@ -164,14 +171,14 @@ static int pmu_event_add(struct perf_event > > > > *event, int mode) > > > > struct hw_perf_event *hwc = &event->hw; > > > > un

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-21 Thread Peter Zijlstra
On Thu, Jan 21, 2016 at 10:42:35PM +0800, Huang Rui wrote: > > > @@ -164,14 +171,14 @@ static int pmu_event_add(struct perf_event *event, > > > int mode) > > > struct hw_perf_event *hwc = &event->hw; > > > unsigned long flags; > > > > > > - spin_lock_irqsave(&pmu->lock, flags); > > > + raw_s

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-21 Thread Huang Rui
On Thu, Jan 21, 2016 at 10:02:57AM +0100, Peter Zijlstra wrote: > On Thu, Jan 21, 2016 at 03:04:38PM +0800, Huang Rui wrote: > > I just quickly looked at about the spinlock on -rt mode. Because > > realtime linux kernel provides two kinds of spinlock, the original > > spinlock_t will be replaced th

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-21 Thread Peter Zijlstra
On Thu, Jan 21, 2016 at 03:04:38PM +0800, Huang Rui wrote: > I just quickly looked at about the spinlock on -rt mode. Because > realtime linux kernel provides two kinds of spinlock, the original > spinlock_t will be replaced the one which is able to sleep, actually, > like mutex. And another one (y

Re: [PATCH v2 5/5] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-20 Thread Huang Rui
On Wed, Jan 20, 2016 at 10:22:44AM +0100, Peter Zijlstra wrote: > On Wed, Jan 20, 2016 at 12:48:24PM +0800, Huang Rui wrote: > > Hi Peter, > > > > Thanks so much to your comments. > > > > On Tue, Jan 19, 2016 at 01:12:50PM +0100, Peter Zijlstra wrote: > > > On Thu, Jan 14, 2016 at 10:50:08AM +080