Re: [PATCH] mm/mmu_notifier: Remove non_block_start/end() from notifier invocation

From: David Woodhouse

Date: Fri Aug 28 2026 - 19:18:57 EST


On Fri, 2026-08-28 at 00:25 +0100, David Woodhouse wrote:
> It's working; the latency numbers have been looking good in all of
> my RT/DYNAMIC and debug/prod-like permutations. Redoing on the very
> latest now...

Done, and unsurprisingly it didn't suddenly fall apart. I think we're
close (again, including the try_synchronize_srcu() part as I don't want
synchronize_srcu_atomic() without that fast path). Thank you for
working on this.

The GP latency never exceeded 1.6ms even with KASAN+lockdep on
PREEMPT_RT, and stayed under ~700µs on production-like configs — while
the rwlock it replaces gets to 3.9ms on RT and 15.7ms with the debug
options. Not that the grace period is the only thing we're optimising
for — the read side also scales a lot better for concurrent access in
the Xen interrupt delivery case. And the guest-mode pinning fits nicely
into the RCU model as that's basically what KVM_GUEST_USES_PFN was
doing in the first place, even when the 'normal' path used the rwlock.

It has also soaked clean for 24h+ across three machines (ICX, GNR,
Milan; ~20h on PREEMPT_RT), with the syzbot reproducers plus nested VMX
and SVM guests taking madvise and memslot churn against their pinned
pages. My earlier tests on nested SVM were giving about a 20%
performance win on the L2 exit round trips.

I shall wait for the dust to settle on srcu_read_lock_atomic() et al,
and keep the rest of the conversion in the wings. Sean, do you want me
to repost it now to review the KVM parts properly?

https://git.infradead.org/?p=users/dwmw2/linux.git;a=shortlog;h=refs/heads/gpc-v3

* ee0e24a0041b KVM: x86/mmu: Drop the rmap bit-spinlock entirely on PREEMPT_RT (gpc-v3)
* 51de7a793839 KVM: selftests: Add nested transition benchmark
* 37c9400feec3 KVM: nSVM: Cache L1's IO permissions map pages
* 1c10fdf9c46d KVM: nSVM: Cache L1's MSR permissions map pages
* 7af4264346c2 KVM: nSVM: Use a gfn_to_pfn_cache for the vmcb12 page
* de951cadb238 KVM: x86: Move nested GPC lock helpers to x86.h as kvm_gpc_lock_page()
* f04543987d9f KVM: selftests: Add nested VMX APIC cache invalidation test
* 1b50353089d4 KVM: nVMX: Use pinned pfncache for L1 APIC virtualization pages
* 4ae1202ef919 KVM: nVMX: Implement cache for L1 MSR bitmap
* 5102fb3c55fb KVM: x86: Post KVM_REQ_GET_NESTED_STATE_PAGES on memslot updates
* 47998916d89f KVM: pfncache: Return -EAGAIN for a lookup which hits an invalid memslot
* 2dab55238cd7 KVM: pfncache: Add guest-mode pinning (GUEST_USES_PFN successor)
* 9740a75db3d5 KVM: x86: Use gfn_to_pfn_cache for steal time / preempted status
* 3898f98ca5cd KVM: x86: Request the guest TLB flush from record_steal_time()
* 0a06af648fa6 KVM: x86/xen: Don't dirty track "vCPU info" page
* eef7b09e5b52 KVM: x86/xen: Explicitly tag "shared info" page as never being dirty tracked
* 99a7eae0266e KVM: x86/xen: Extract delivery of event to vCPU into a separate helper
* f0162bb012fb KVM: pfncache: Use atomic SRCU for readers instead of a rwlock
* 003716df6605 mm/mmu_notifier: Remove non_block_start/end() from notifier invocation
* 6d484ca99bc9 srcu: Try the inline no-readers proof first in synchronize_srcu_atomic()
* 23f10e07aba3 srcu: Add try_synchronize_srcu() for callers which can prove readers absent
* 2a55908bb12d srcu: Keep a spare node array so srcu_gp_end() need not block in reclaim
* cb117542cb92 srcu: Remove development pr_alert()s from synchronize_srcu_atomic()
* 02738b15e08c Merge remote-tracking branch 'rcu/dev' into gpc-v3
|\
| * 7b9f3a948136 torture: Allow specifying alternative ssh command to kvm-remote.sh (rcu/dev)
| * cd71c7941b25 doc: RCU: Fix s/strategem/stratagem/ typo in Requirements.rst
| * f1b2e15ef249 rcu: fix shrink budget underflow in lazy_rcu_shrink_scan
| * 8c9be6c76148 rcutorture: Synchronously wait for all rcu_torture_irq() callbacks to complete
| * 48b4d9799efe rcu: Use IRQ_WORK_INIT_HARD for srcu's irq_work
| * 260d0fdf6ea3 rcutorture: Fix divide-by-zero with fwd_progress_div=1
| * 5d9c38fbf615 fixup! srcutiny: Add an atomic Tiny SRCU
| * 7a263580788e fixup! srcutree: Add an atomic Tree SRCU
| * c2225b77b028 srcu_tree: Disable preemption across synchronize_srcu_atomic()
| * e56c969b6c7b rcutorture: Add support for testing synchronize_srcu_atomic()
| * 9a2e9996ccec srcutiny: Add an atomic Tiny SRCU
| * 6cf65dd4d8fb srcutree: Add an atomic Tree SRCU
| ⋮ (older rcu/dev elided)
* | dc14992a9abe KVM: pfncache: use a dedicated invalidation sequence for cache refresh (xen-v3)
* | a83533b07c67 KVM: x86/xen: Mark poll_evtchn accesses with READ_ONCE()/WRITE_ONCE()
* | f578df3dda4e KVM: x86/xen: Take kvm->srcu in __kvm_xen_has_interrupt()
* | 0e38de3983e6 KVM: x86/xen: Use atomic*() APIs instead of open coded equivalents
* | f6179ff87266 KVM: x86/xen: Use 32-bit atomics if vCPU's evtchn_pending_sel isn't aligned
* | 9c3243ef9edb KVM: x86/xen: Use 32-bit locked bts for vcpu_info evtchn_pending_sel
* | 113a5ed7489f KVM: x86/xen: Enforce 4-byte alignment of vcpu_info registration
* | 2505c393701c KVM: x86/xen: Latch shinfo mode in kvm_xen_schedop_poll()
* | 9dfe99cf7b45 KVM: x86/xen: Latch shinfo mode in kvm_xen_set_evtchn_fast()
* | 59325fcde6db KVM: x86/xen: Rename max_evtchn_port() to kvm_max_evtchn_port()
* | 2d366afb5114 KVM: x86/xen: Introduce kvm_xen_has_64bit_shinfo() macro
* | 2e26fc558ac9 KVM: x86/xen: Rename 'longmode' to 'is_64bit' in hypercall handling
o | (kvm/next: 76671054f9a1 Merge tag 'kvmarm-7.3' ...)

Attachment: smime.p7s
Description: S/MIME cryptographic signature