lkml.org 
[lkml]   [2012]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] perf: generic intel uncore support
From
Date
On Sun, 2012-04-01 at 11:11 +0800, Yan, Zheng wrote:
>
> >> +static int __init uncore_type_init(struct intel_uncore_type *type)
> >> +{
> >> + struct intel_uncore_pmu *pmus;
> >> + struct attribute_group *events_group;
> >> + struct attribute **attrs;
> >> + int i, j;
> >> +
> >> + pmus = kzalloc(sizeof(*pmus) * type->num_boxes, GFP_KERNEL);
> >> + if (!pmus)
> >> + return -ENOMEM;
> >
> > Hmm, but if you have a pmu per number of boxes, then what do you need
> > that pmu->box reference for?
>
> Type->num_boxes is number of boxes within one physical cpu. pmu->box_hash
> is needed because there can be several physical cpus in a system.

Ah, indeed.



\
 
 \ /
  Last update: 2012-04-03 00:27    [W:0.078 / U:2.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site