Messages in this thread | | | From | Peter Newman <> | Date | Mon, 27 Feb 2023 14:30:38 +0100 | Subject | Re: [PATCH 7/7] x86/resctrl: Determine if Sub-NUMA Cluster is enabled and initialize. |
| |
Hi Tony,
On Thu, Jan 26, 2023 at 7:42 PM Tony Luck <tony.luck@intel.com> wrote: > +static __init int find_snc_ways(void) > +{ > + unsigned long *node_caches; > + int cpu, node, ret; > + > + node_caches = kcalloc(BITS_TO_LONGS(nr_node_ids), sizeof(*node_caches), GFP_KERNEL); > + if (!node_caches) > + return 1; > + > + cpus_read_lock(); > + for_each_node(node) {
Someone tried this patch on a machine with a CPU-less node...
We need to check for this:
+ if (cpumask_empty(cpumask_of_node(node))) + continue;
> + cpu = cpumask_first(cpumask_of_node(node)); > + set_bit(get_cpu_cacheinfo_id(cpu, 3), node_caches); > + } > + cpus_read_unlock();
Thanks! -Peter
| |