Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1190683

Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support

From Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support
Date 2015-07-23 09:30 +0200
Message-ID <pPj75-8jO-39@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> <pPiE2-7wA-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Thursday 23 July 2015 12:19 PM, Daniel Axtens wrote:
> 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...

OK, i will add check for P8_NEST_MAX_PMUS also.

>> Thanks for the review comments
>> Maddy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


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