Re: [PATCH v2 0/8] mm: use spinlock guards for zone lock

From: Andrew Morton

Date: Fri Mar 27 2026 - 16:15:55 EST


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.