Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1190667
| From | Daniel Axtens <dja@axtens.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support |
| Date | 2015-07-23 09:00 +0200 |
| Message-ID | <pPiE2-7wA-15@gated-at.bofh.it> (permalink) |
| References | <pMPmO-50R-3@gated-at.bofh.it> <pMPmO-50R-7@gated-at.bofh.it> <pOUs1-5s1-1@gated-at.bofh.it> <pPium-7ld-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, 2015-07-23 at 12:18 +0530, Madhavan Srinivasan wrote:
>
> On Wednesday 22 July 2015 10:33 AM, Daniel Axtens wrote:
> >> +static void nest_change_cpu_context(int old_cpu, int new_cpu)
> >> +{
> >> + int i;
> >> +
> >> + for (i = 0; per_nest_pmu_arr[i] != NULL; i++)
> >> + perf_pmu_migrate_context(&per_nest_pmu_arr[i]->pmu,
> >> + old_cpu, new_cpu);
> > From patch 4, I see per_nest_pmu_arr is defined as:
> > +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS];
> >
> > Therefore, does this loop need to have a check that
> > i < P8_NEST_MAX_PMUS?
>
> No, that is max possible pmu, but we may have only couple for nest pmus
> registered.
>
What if we have P8_NEST_MAX_PMUS registered? Then we'll check beyond the
end of the array...
> Thanks for the review comments
> Maddy
> >
>
--
Regards,
Daniel
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support Madhavan Srinivasan <maddy@linux.vnet.ibm.com> - 2015-07-23 08:50 +0200
Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support Daniel Axtens <dja@axtens.net> - 2015-07-23 09:00 +0200
Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support Madhavan Srinivasan <maddy@linux.vnet.ibm.com> - 2015-07-23 09:30 +0200
csiph-web