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

From: Jason Gunthorpe

Date: Tue Aug 11 2026 - 11:35:24 EST


On Tue, Aug 11, 2026 at 04:24:48PM +0100, David Woodhouse wrote:

> I had a second reason for disabling the overzealous check too: to allow
> SRCU grace periods within the notifier callbacks.

Don't agree with allowing this at all.

> > Thus, perhaps something like this:
> >
> >   if (ops->invalidate_range_start) {
> >   int _ret;
> >  
> > if (!IS_ENABLED(CONFIG_PREEMPT_RT) && !mmu_notifier_range_blockable(range))
> > non_block_start();
> >   _ret = ops->invalidate_range_start(subscription, range);
> > if (!IS_ENABLED(CONFIG_PREEMPT_RT) && !mmu_notifier_range_blockable(range))
> > non_block_end();
> >
> > ?

This seems fine to me

> Or put it in a per-mmu-notifier-ops flag (a bit like the one in commit
> 5ff7091f5a2c, but with almost opposite semantics), and let the drivers
> Jason cares about still keep the guard, while KVM doesn't need to. With
> or without the RT part...

Nope, common API semantics please.

Jason