[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1506241413360.32420@vshiva-Udesk>
Date: Wed, 24 Jun 2015 14:15:47 -0700 (PDT)
From: Vikas Shivappa <vikas.shivappa@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>
cc: Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
mingo@...nel.org, tj@...nel.org, peterz@...radead.org,
Matt Fleming <matt.fleming@...el.com>,
"Auld, Will" <will.auld@...el.com>,
"Williamson, Glenn P" <glenn.p.williamson@...el.com>,
"Juvva, Kanaka D" <kanaka.d.juvva@...el.com>,
"Autee, Priya V" <priya.v.autee@...el.com>
Subject: Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache
Allocation
On Wed, 24 Jun 2015, Thomas Gleixner wrote:
> On Tue, 23 Jun 2015, Vikas Shivappa wrote:
>> +/*
>> + * cbm_update_msrs() - Updates all the existing IA32_L3_MASK_n MSRs
>> + * which are one per CLOSid except IA32_L3_MASK_0 on the current package.
>> + */
>> +static inline void cbm_update_msrs(void)
>> +{
>> + int maxid = boot_cpu_data.x86_cache_max_closid;
>> + unsigned int i;
>> +
>> + /*
>> + * At cpureset, all bits of IA32_L3_MASK_n are set.
>> + * The index starts from one as there is no need
>> + * to update IA32_L3_MASK_0 as it belongs to root cgroup
>> + * whose cache mask is all 1s always.
>> + */
>> + for (i = 1; i < maxid; i++) {
>> + if (ccmap[i].clos_refcnt)
>> + cbm_cpu_update((void *)i);
>
> So this is called via
>
> intel_rdt_cpu_notifier(CPU_ONLINE)
> intel_rdt_cpu_start()
> cbm_update_msrs()
> cbm_cpu_update()
> wrmsr()
>
> And runs on the CPU which initiated the hotplug and not on the newly
> online cpu. Pretty useless, right?
Will fix.
>
>> + }
>> +}
>> +
>> +static inline void intel_rdt_cpu_start(int cpu)
>> +{
>> + struct intel_pqr_state *state = &per_cpu(pqr_state, cpu);
>> +
>> + state->closid = 0;
>> + mutex_lock(&rdt_group_mutex);
>> + if (rdt_cpumask_update(cpu))
>> + cbm_update_msrs();
>> + mutex_unlock(&rdt_group_mutex);
>> +}
>> +
>> +static void intel_rdt_cpu_exit(unsigned int cpu)
>> +{
>> + int i;
>> +
>> + mutex_lock(&rdt_group_mutex);
>> + if (!cpumask_test_and_clear_cpu(cpu, &rdt_cpumask)) {
>> + mutex_unlock(&rdt_group_mutex);
>> + return;
>> + }
>> +
>> + i = cpumask_any_online_but(topology_core_cpumask(cpu), cpu);
>> + if (i < nr_cpu_ids)
>> + cpumask_set_cpu(i, &rdt_cpumask);
>> + mutex_unlock(&rdt_group_mutex);
>
> Same issue as in the cqm patch.
will fix.
yes this may risk the package to not have some updates.
Thanks,
Vikas
>
> Thanks,
>
> tglx
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists