On 24/03/26 20:47, Shrikanth Hegde wrote:
> On 3/24/26 3:17 PM, Valentin Schneider wrote:
>> housekeeping_overridden is only ever enabled in the __init function
>> housekeeping_init(), and is never disabled. Mark it __ro_after_init.
>>
>
> what about housekeeping_update which could be via isolated_cpus_update
> when creating isolated cpusets.
>
Doh, I'd even seen the patches but forgot to make a note of em. So yeah,
that's not __init and the key is now flippable at runtime.
I suppose I could resurrect:
https://lore.kernel.org/lkml/20251114150133.1056710-6-vschneid@redhat.com/
+ the is_kernel_noinstr_text() thing from
https://lore.kernel.org/lkml/20251114151428.1064524-5-vschneid@redhat.com/
and have the IPI associated with flipping that key never be deferred, so if
we suddenly have some CPU isolation, every CPU gets poked.
>> Signed-off-by: Valentin Schneider <vschneid@redhat.com>
>> ---
>> kernel/sched/isolation.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
>> index 3ad0d6df6a0a2..54d1d93cdeea5 100644
>> --- a/kernel/sched/isolation.c
>> +++ b/kernel/sched/isolation.c
>> @@ -16,7 +16,7 @@ enum hk_flags {
>> HK_FLAG_KERNEL_NOISE = BIT(HK_TYPE_KERNEL_NOISE),
>> };
>>
>> -DEFINE_STATIC_KEY_FALSE(housekeeping_overridden);
>> +DEFINE_STATIC_KEY_FALSE_RO(housekeeping_overridden);
>> EXPORT_SYMBOL_GPL(housekeeping_overridden);
>>
>> struct housekeeping {