Re: [PATCH v6] um: Enable preemption in UML

2023-09-22 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Johannes Berg" >> -mmap_read_lock(mm); >> +/* We use a RCU lock instead of a mm lock, because >> + * this can be invoked out of critical/atomic sections >> + * and that does not agree with the sleepable semantics >> + * of the standard sem

Re: [PATCH v6] um: Enable preemption in UML

2023-09-22 Thread Peter Lafreniere
On Fri, Sept 22, 2023 at 06:56, anton.iva...@cambridgegreys.com wrote: > > From: Anton Ivanov anton.iva...@cambridgegreys.com > > > 1. Preemption requires saving/restoring FPU state. This patch > adds support for it using GCC intrinsics as well as appropriate > storage space in the thread struct

Re: [PATCH v6] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 12:22, Johannes Berg wrote: 4. UML TLB flush is also invoked during a fork. This happens with interrupts and preempt disabled which disagrees with the standard mm locking via rwsem. The mm lock for this code path had to be replaced with an rcu. For the record, even if I figure

Re: [PATCH v6] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
> > 4. UML TLB flush is also invoked during a fork. This happens > with interrupts and preempt disabled which disagrees with the > standard mm locking via rwsem. The mm lock for this code path > had to be replaced with an rcu. For the record, even if I figured out this gets rid of the complaints,

Re: [PATCH v6] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 11:56, anton.iva...@cambridgegreys.com wrote: From: Anton Ivanov 1. Preemption requires saving/restoring FPU state. This patch adds support for it using GCC intrinsics as well as appropriate storage space in the thread structure. 2. irq critical sections need preempt_disable()

[PATCH v6] um: Enable preemption in UML

2023-09-22 Thread anton . ivanov
From: Anton Ivanov 1. Preemption requires saving/restoring FPU state. This patch adds support for it using GCC intrinsics as well as appropriate storage space in the thread structure. 2. irq critical sections need preempt_disable()/preempt_enable(). 3. TLB critical sections need preempt_disable