[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1506241018130.4037@nanos>
Date: Wed, 24 Jun 2015 10:21:20 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Vikas Shivappa <vikas.shivappa@...ux.intel.com>
cc: linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
mingo@...nel.org, tj@...nel.org, peterz@...radead.org,
matt.fleming@...el.com, will.auld@...el.com,
glenn.p.williamson@...el.com, kanaka.d.juvva@...el.com,
priya.v.autee@...el.com
Subject: Re: [PATCH 09/10] x86/intel_rdt: Hot cpu support for Cache
Allocation
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?
> + }
> +}
> +
> +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.
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