[PATCH v5] um: Enable preemption in UML

Anton Ivanov anton.ivanov at cambridgegreys.com
Fri Sep 22 00:29:35 PDT 2023


On 22/09/2023 08:27, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "anton ivanov" <anton.ivanov at cambridgegreys.com>
>> An: "linux-um" <linux-um at lists.infradead.org>
>> CC: "Johannes Berg" <johannes at sipsolutions.net>, "richard" <richard at nod.at>, "anton ivanov"
>> <anton.ivanov at cambridgegreys.com>
>> Gesendet: Freitag, 22. September 2023 08:52:12
>> Betreff: [PATCH v5] um: Enable preemption in UML
>> From: Anton Ivanov <anton.ivanov at cambridgegreys.com>
>>
>> Preemption requires saving/restoring FPU state. This patch
>> adds support for it using GCC intrinsics.
> Can you please state in future patches what you have changed since the last one?

Ack. Sorry.

This one adds guards around the critical sections in the TLB.

As a result I no longer see any barfs on startup in the configuration where I was observing them (nfs kernel server).

Both preempt and voluntary now boot without issues in that config.

>   
>> Signed-off-by: Anton Ivanov <anton.ivanov at cambridgegreys.com>
>> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
>> index 7d050ab0f78a..34ec8e677fb9 100644
>> --- a/arch/um/kernel/tlb.c
>> +++ b/arch/um/kernel/tlb.c
>> @@ -362,6 +362,9 @@ static int flush_tlb_kernel_range_common(unsigned long
>> start, unsigned long end)
>>
>> 	mm = &init_mm;
>> 	hvc = INIT_HVC(mm, force, userspace);
>> +
>> +    preempt_disable();
>> +
> Does this address the bootup splat I've reported yesterday?
>
>
> Thanks,
> //richard
>
-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/




More information about the linux-um mailing list