Re: [PATCH] mm/mmu_notifier: Remove non_block_start/end() from notifier invocation
From: Jason Gunthorpe
Date: Wed Aug 12 2026 - 08:47:09 EST
On Wed, Aug 12, 2026 at 09:21:31AM +0100, David Woodhouse wrote:
> On Wed, 2026-08-12 at 10:14 +0200, Michal Hocko wrote:
> > On Tue 11-08-26 16:24:48, David Woodhouse wrote:
> > [...]
> > > I had a second reason for disabling the overzealous check too: to allow
> > > SRCU grace periods within the notifier callbacks.
> >
> > Is there a way that srcu barrier could cause an indirect dependency on
> > memory allocation? In other words what might block the scru to complete?
>
> Not after https://lore.kernel.org/all/6eed3fe3461e9690b486ca98fa7563f60d3940ff.camel@xxxxxxxxxxxxx/
The user of the SRCU might have a read side that wraps an allocate. In
general it is not safe.
I'm skeptical that without special API and documentation the KVM
special use of SRCU you've outlined will not remain working long term
too..
Jason