Re: [PATCH 1/8] mm: use zone lock guard in reserve_highatomic_pageblock()

From: Andrew Morton

Date: Fri Mar 06 2026 - 12:54:03 EST


On Fri, 6 Mar 2026 16:05:35 +0000 Dmitry Ilvokhin <d@xxxxxxxxxxxx> wrote:

> Use the newly introduced zone_lock_irqsave lock guard in
> reserve_highatomic_pageblock() to replace the explicit lock/unlock and
> goto out_unlock pattern with automatic scope-based cleanup.
>
> ...
>
> - zone_lock_irqsave(zone, flags);
> + guard(zone_lock_irqsave)(zone);

guard() is cute, but this patch adds a little overhead - defconfig
page_alloc.o text increases by 32 bytes, presumably all in
reserve_highatomic_pageblock(). More instructions, larger cache
footprint.

So we're adding a little overhead to every user's Linux machine for all
time. In return for which the developers get a little convenience and
maintainability.

Is it worth it?