Re: [PATCH v2 01/20] locking/rt: Use raw_spin_lock_irqsave() in __rwbase_read_unlock()
From: Paolo Bonzini
Date: Sat May 30 2026 - 09:03:12 EST
On Sat, May 30, 2026 at 12:26 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> There was a pending patch to allow the MMU notifiers to disable
> themselves while still in sleepable context.
>
> https://lore.kernel.org/kvm/20260429222548.25475-1-shaikhkamal2012@xxxxxxxxx/
>
> It really needs to be split in multiple parts, and the allocation needs
> to be removed. Looking at it.
I did clean it up but nope, it's broken... You can't really stop the
MMU notifiers while the OOM reaper runs because the victim's own
threads are still running and can do whatever they want. If one is in
kvm_swap_active_memslots(), the callback would reset
mn_active_invalidate_count but leave the thread sleeping forever.
Unfortunately this doesn't give me much confidence about how to adopt
SRCU for the gfn-to-pfn caches, unless you come up with a way to avoid
vmentry after OOM?
Paolo