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 Wed 2023-06-21 20:33:35, Tetsuo Handa wrote:
> On 2023/06/21 19:40, Sebastian Andrzej Siewior wrote:
> > printk_deferred_enter() has to be invoked in non-migrate-able context to
> > ensure that deferred printing is enabled and disabled on the same CPU.
> 
> I can't catch. local_irq_save(flags); makes non-migrate-able context
> because sleeping is not allowed while IRQ is disabled, doesn't it?
> 
> > This is the case after zonelist_update_seq has been acquired.
> > 
> > Acquire zonelist_update_seq with write_seqlock_irqsave() and then defer
> > printk output.
> 
> What guarantees that write_seqlock_irqsave() never calls printk()
> (e.g. lockdep warning) before printk_deferred_enter() takes effect?

I think that we should explicitly disable preemption in
printk_deferred_enter(). The disabled interrupts are not
strictly necessary.

I am going to resurrect the patch
https://lore.kernel.org/r/20230419074210.17646-1-pmladek@xxxxxxxx
and add the preempt_disable()/enable() at the same time.

Is this going to work for you?

Best Regards,
Petr




[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