Re: [PATCH] mm/page_alloc: Use write_seqlock_irqsave() instead write_seqlock() + local_irq_save().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-06-21 12:59:44 [+0200], Michal Hocko wrote:
> On Wed 21-06-23 12:40:34, Sebastian Andrzej Siewior wrote:
> > __build_all_zonelists() acquires zonelist_update_seq by first disabling
> > interrupts via local_irq_save() and then acquiring the seqlock with
> > write_seqlock(). This is troublesome and leads to problems on
> > PREEMPT_RT because the inner spinlock_t is now acquired with disabled
> > interrupts.
> 
> And the spinlock might sleep with PREEMPT_RT so a deadlock, right? It
> would be better to call that out explicitly

No, no deadlock. Let me double check this a VM with mem-hotplug later
one but I don't expect an IRQ path. If so there should be more broken
pieces…

On PREEMPT_RT what you can happen is that the writer is preempted by a
high-priority reader which then deadlocks because the reader spins while
waiting and the writer is blocked. For this issue we have lock + unlock
in the seq reader to PI boost the seq writer so it can make progress. 

Sebastian





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux