Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Davidlohr Bueso
On Wed, 26 Feb 2025, Alexei Starovoitov wrote: On Wed, Feb 26, 2025 at 9:01???AM Davidlohr Bueso wrote: On Fri, 14 Feb 2025, Vlastimil Babka wrote: >From: Sebastian Andrzej Siewior > >In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect >critical section, but it doesn't preven

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 9:01 AM Davidlohr Bueso wrote: > > On Fri, 14 Feb 2025, Vlastimil Babka wrote: > > >From: Sebastian Andrzej Siewior > > > >In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect > >critical section, but it doesn't prevent NMI, so the fully reentrant > >code can

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Davidlohr Bueso
On Fri, 14 Feb 2025, Vlastimil Babka wrote: From: Sebastian Andrzej Siewior In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect critical section, but it doesn't prevent NMI, so the fully reentrant code cannot use local_lock_irqsave() for exclusive access. Introduce localtry_loc

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-18 Thread Alexei Starovoitov
On Mon, Feb 17, 2025 at 6:35 AM Vlastimil Babka wrote: > > On 2/17/25 15:19, Sebastian Andrzej Siewior wrote: > > On 2025-02-14 17:27:39 [+0100], Vlastimil Babka wrote: > >> From: Sebastian Andrzej Siewior > >> > >> In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect > >> critical

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-17 Thread Sebastian Andrzej Siewior
On 2025-02-17 15:35:11 [+0100], Vlastimil Babka wrote: > > spin_trylock() is not safe due to explicit locking in the underneath > > rt_spin_trylock() implementation. Removing this explicit locking and > > attempting only "trylock" is undesired due to PI implications. > > Just to be sure, you're su

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-17 Thread Vlastimil Babka
On 2/17/25 15:19, Sebastian Andrzej Siewior wrote: > On 2025-02-14 17:27:39 [+0100], Vlastimil Babka wrote: >> From: Sebastian Andrzej Siewior >> >> In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect >> critical section, but it doesn't prevent NMI, so the fully reentrant >> code c

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-17 Thread Sebastian Andrzej Siewior
On 2025-02-14 17:27:39 [+0100], Vlastimil Babka wrote: > From: Sebastian Andrzej Siewior > > In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect > critical section, but it doesn't prevent NMI, so the fully reentrant > code cannot use local_lock_irqsave() for exclusive access. > >