Re: [PATCH v6 05/21] x86/resctrl: Add domain offline callback for resctrl work

From: James Morse
Date: Thu Sep 08 2022 - 13:01:09 EST


Hi Hao Xin,

On 07/09/2022 07:29, haoxin wrote:
> 在 2022/9/2 下午11:48, James Morse 写道:
>> Because domains are exposed to user-space via resctrl, the filesystem
>> must update its state when CPU hotplug callbacks are triggered.
>>
>> Some of this work is common to any architecture that would support
>> resctrl, but the work is tied up with the architecture code to
>> free the memory.
>>
>> Move the monitor subdir removal and the cancelling of the mbm/limbo
>> works into a new resctrl_offline_domain() call. These bits are not
>> specific to the architecture. Grouping them in one function allows
>> that code to be moved to /fs/ and re-used by another architecture.

>> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> index 030a70326ccc..5830905a92d2 100644
>> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> @@ -3233,6 +3231,45 @@ static int __init rdtgroup_setup_root(void)
>>       return ret;
>>   }
>>   +static void domain_destroy_mon_state(struct rdt_domain *d)

> add inline ?

As previously, the compiler doesn't need to be told it can inline static functions in a C
file.


Thanks,

James