Re: [PATCH v7 2/4] s390/mm: Batch PTE updates in lazy MMU mode

From: Heiko Carstens

Date: Thu Aug 27 2026 - 04:16:35 EST


On Wed, Aug 26, 2026 at 04:34:25PM +0200, Alexander Gordeev wrote:
> On Wed, Aug 26, 2026 at 03:02:57PM +0200, Heiko Carstens wrote:
> > Would be nice if we could avoid the not so obvious local_bh_disable()
> > and local_bh_enable() pairs.
>
> Calling ptep_get() from BH context was certainly unexpected, but the way
> local_bh_enable|disable() pairs are used is actually straightforward.
> This is a slow path anyway, so I would think the simplicity prevails in
> this case.
>
> But again, I will try to avoid that.

I do agree that ptep_get() being called from BH context is not what I
would have expected too. But then again, nothing prevents people from
doing that from irq context too, no matter if that is sane or not.

Imho the "final" version should either be implemented that it can go
without disabling bottom halves, or, if that is not worth the effort,
even disable interrupts, just to avoid other surprises.
Plus a comment why it is needed, please.