lkml.org 
[lkml]   [2016]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] perf/x86/amd/power: Add AMD accumulated power reporting mechanism
On Mon, Jan 25, 2016 at 12:13:05PM +0100, Peter Zijlstra wrote:
> On Mon, Jan 25, 2016 at 04:32:03PM +0800, Huang Rui wrote:
> > +struct power_pmu {
> > + raw_spinlock_t lock;
> > + struct list_head active_list;
>
> Maybe a dumb question, but what is that list for?
>
> You only ever add/del events to/from it, you never iterate it. So why
> keep it?
>
> If you drop the list, the lock can go too I think, making all this stuff
> simpler.

Yes, the active_list seems a bit superfluous if not be iterated. I
will remove it.

Any other comments? :-)

Thanks,
Rui

\
 
 \ /
  Last update: 2016-01-25 17:01    [W:0.094 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site