RE: [PATCH v20 17/18] x86/resctrl: Sub-NUMA Cluster (SNC) detection

From: Luck, Tony
Date: Fri Jun 21 2024 - 13:14:36 EST


> > Add the missing definition of pr_fmt() to monitor.c. …
>
> How do you think about to add the tag “Fixes” accordingly?

Until this patch there were only "can't happen" pr_info()/pr_warn()
messages. So no real benefit from having this backported.

If it were to be backported, would need to split this out from the
rest of this patch as the rest of the changes are dependent on
on the previous 16 patches in this series.

> > +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
>
> > +static __init int snc_get_config(void)
> > +{
>
> > + cpus_read_lock();
> > + if (num_online_cpus() != num_present_cpus())
> > + pr_warn("Some CPUs offline, SNC detection may be incorrect\n");
> > + cpus_read_unlock();
>
>
> Would you become interested to apply a statement like “guard(cpus_read_lock)();”?
> https://elixir.bootlin.com/linux/v6.10-rc4/source/include/linux/cleanup.h#L133

IMHO it would be better to convert resctrl to using the cleanup.h helpers
as a separate series rather than having just one place use it.

-Tony