Re: [PATCH v2 0/8] mm: use spinlock guards for zone lock
From: Dmitry Ilvokhin
Date: Mon Mar 30 2026 - 12:50:45 EST
On Fri, Mar 27, 2026 at 01:11:20PM -0700, Andrew Morton wrote:
> On Fri, 27 Mar 2026 16:14:40 +0000 Dmitry Ilvokhin <d@xxxxxxxxxxxx> wrote:
>
> > This series uses spinlock guard for zone lock across several mm
> > functions to replace explicit lock/unlock patterns with automatic
> > scope-based cleanup.
> >
> > This simplifies the control flow by removing 'flags' variables, goto
> > labels, and redundant unlock calls.
> >
> > Patches are ordered by decreasing value. The first six patches simplify
> > the control flow by removing gotos, multiple unlock paths, or 'ret'
> > variables. The last two are simpler lock/unlock pair conversions that
> > only remove 'flags' and can be dropped if considered unnecessary churn.
>
> Thanks, you've been busy.
>
> I'm not wanting to move new, non-fix, non-speedup things into mm.git
> until after -rc1 so there's your target. But now is a good time to be
> sending out material for people to look at. Let's not have a gigantic
> flood of new stuff the day after -rc1!
>
> I think progress here is totally dependent on whether those who
> regularly work on this code want guard() in there. A
> preference/familiarity/style choice, mainly. At present the adoption
> of guard() in mm/*.c is very small.
>
Thanks for taking a look, Andrew.
I'm not aiming for any particular merge window here. I had some time to
revisit the previous version and rework it, so I sent this now mainly to
keep the discussion going.
I agree this probably comes down to whether people are comfortable with
using guard() in this code. It'd be great to hear what others working in
mm, and in page_alloc in particular, think.