Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dmitry Ilvokhin <d@ilvokhin.com>
Cc: Vlastimil Babka <vbabka@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, Steven Rostedt <rostedt@goodmis.org>,
	david@kernel.org, Lorenzo Stoakes <ljs@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v3 0/8] mm: use spinlock guards for zone lock
Date: Wed, 29 Apr 2026 08:37:30 -0700	[thread overview]
Message-ID: <20260429083730.c105bc1cff04a8e92a74a32b@linux-foundation.org> (raw)
In-Reply-To: <cover.1777462630.git.d@ilvokhin.com>

On Wed, 29 Apr 2026 12:02:05 +0000 Dmitry Ilvokhin <d@ilvokhin.com> 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.
> 
> Binary size increase is +39 bytes, with Peter Zijlstra's fix for guards
> [1] applied (already in mm-stable). This is due to the compiler not
> being able to deduplicate epilogue and eliminate redundant NULL check.
> See discussion [2] for more details. I proposed a patch [3] that fixes
> this, but until it is merged we need to assume +39 bytes will stay
> (though it is compiler dependent).

OK, thanks, I'll queue it up.

Yet again: the question here is whether those who work on this code
like guard(), or would prefer the traditional open-coded locking. 
Michal was an ack, others were silent.



      parent reply	other threads:[~2026-04-29 15:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 12:02 [PATCH v3 0/8] mm: use spinlock guards for zone lock Dmitry Ilvokhin
2026-04-29 12:02 ` [PATCH v3 8/8] mm: use zone lock guard in __offline_isolated_pages() Dmitry Ilvokhin
2026-04-29 12:02   ` Dmitry Ilvokhin
2026-04-29 12:02 ` [PATCH v3 1/8] mm: use zone lock guard in reserve_highatomic_pageblock() Dmitry Ilvokhin
2026-04-29 12:02 ` [PATCH v3 2/8] mm: use zone lock guard in unset_migratetype_isolate() Dmitry Ilvokhin
2026-04-29 15:40   ` Zi Yan
2026-04-29 12:02 ` [PATCH v3 3/8] mm: use zone lock guard in unreserve_highatomic_pageblock() Dmitry Ilvokhin
2026-04-29 12:02 ` [PATCH v3 4/8] mm: use zone lock guard in set_migratetype_isolate() Dmitry Ilvokhin
2026-04-29 15:39   ` Zi Yan
2026-04-29 12:02 ` [PATCH v3 5/8] mm: use zone lock guard in take_page_off_buddy() Dmitry Ilvokhin
2026-04-29 12:02 ` [PATCH v3 6/8] mm: use zone lock guard in put_page_back_buddy() Dmitry Ilvokhin
2026-04-29 12:02 ` [PATCH v3 7/8] mm: use zone lock guard in free_pcppages_bulk() Dmitry Ilvokhin
2026-04-29 15:37 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260429083730.c105bc1cff04a8e92a74a32b@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=d@ilvokhin.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox