Re: [PATCH v1 03/20] x86/resctrl: Add domain online callback for resctrl work

From: James Morse
Date: Fri Sep 17 2021 - 12:58:23 EST


Hi Reinette,

On 01/09/2021 22:19, Reinette Chatre wrote:
> On 7/29/2021 3:35 PM, James Morse wrote:
>> +int resctrl_online_domain(struct rdt_resource *r, struct rdt_domain *d)
>> +{

>> +
>> +    if (is_mbm_enabled()) {
>> +        INIT_DELAYED_WORK(&d->mbm_over, mbm_handle_overflow);
>> +        mbm_setup_overflow_handler(d, MBM_OVERFLOW_INTERVAL);
>> +    }
>> +
>> +    if (is_llc_occupancy_enabled())
>> +        INIT_DELAYED_WORK(&d->cqm_limbo, cqm_handle_limbo);
>> +
>
> You also seem to address an issue where this work was not properly cleaned up on the error
> paths of the replaced domain_setup_mon_state(). Thank you.

Oops ... if I'd thought of it like that I'd have sent it as a fix!
(huh, it'll need a backport too, bother)


>> +    /* If resctrl is mounted, add per domain monitor data directories. */
>> +    if (static_branch_unlikely(&rdt_enable_key))
>
> Should this be rdt_mon_enable_key instead?

Yup, fixed.


Thanks,

James