Re: [PATCH v5 09/29] x86,fs/resctrl: Refactor domain_remove_cpu_mon() ready for new domain types

From: Reinette Chatre
Date: Tue Jun 03 2025 - 23:33:05 EST


Hi Tony,

On 5/21/25 3:50 PM, Tony Luck wrote:
> @@ -4041,6 +4041,9 @@ void resctrl_offline_mon_domain(struct rdt_resource *r, struct rdt_mon_domain *d
> if (resctrl_mounted && resctrl_arch_mon_capable())
> rmdir_mondata_subdir_allrdtgrp(r, d);
>
> + if (r->rid != RDT_RESOURCE_L3)
> + goto done;

resctrl does not use "do" or "done" terms in goto.
"grep goto fs/resctrl/rdtgroup.c" to get a summary of terms used by this file.
Typical is "out" or "out_<term>" where <term> is work jumped to, for example,
using "out_unlock" here will match other code.

> +
> if (resctrl_is_mbm_enabled())
> cancel_delayed_work(&d->mbm_over);
> if (resctrl_is_mon_event_enabled(QOS_L3_OCCUP_EVENT_ID) && has_busy_rmid(d)) {
> @@ -4057,7 +4060,7 @@ void resctrl_offline_mon_domain(struct rdt_resource *r, struct rdt_mon_domain *d
> }
>
> domain_destroy_mon_state(d);
> -
> +done:
> mutex_unlock(&rdtgroup_mutex);
> }
>

Reinette