From: Lorenzo Stoakes <ljs@kernel.org>
To: Imran Khan <imran.f.khan@oracle.com>
Cc: akpm@linux-foundation.org, david@kernel.org, liam@infradead.org,
vbabka@kernel.org, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmstat: avoid taking zone lock in /proc/buddyinfo reads
Date: Mon, 8 Jun 2026 09:17:02 +0100 [thread overview]
Message-ID: <aiZ6bgmgh6LHHlWj@lucifer> (raw)
In-Reply-To: <20260604134245.1580287-1-imran.f.khan@oracle.com>
On Thu, Jun 04, 2026 at 09:42:45PM +0800, Imran Khan wrote:
> frag_show_print() just reads zone->free_area[order].nr_free, so
> it can safely do this without needing the zone->lock.
>
> Pass nolock=true from frag_show(), so that walk_zones_in_node()
> can skip the zone->lock acquisition.
>
> Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
LGTM, so:
Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>
> ---
> mm/vmstat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmstat.c b/mm/vmstat.c
> index f534972f517de..7b93fbf9af092 100644
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -1568,7 +1568,7 @@ static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
> static int frag_show(struct seq_file *m, void *arg)
> {
> pg_data_t *pgdat = (pg_data_t *)arg;
> - walk_zones_in_node(m, pgdat, true, false, frag_show_print);
> + walk_zones_in_node(m, pgdat, true, true, frag_show_print);
> return 0;
> }
>
>
> base-commit: e43ffb69e0438cddd72aaa30898b4dc446f664f8
> --
> 2.34.1
>
Cheers, Lorenzo
next prev parent reply other threads:[~2026-06-08 8:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 13:42 [PATCH] mm/vmstat: avoid taking zone lock in /proc/buddyinfo reads Imran Khan
2026-06-04 17:04 ` Joshua Hahn
2026-06-05 12:14 ` Vlastimil Babka (SUSE)
2026-06-08 8:17 ` Lorenzo Stoakes [this message]
2026-06-24 7:16 ` Lorenzo Stoakes
2026-06-24 7:17 ` David Hildenbrand (Arm)
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=aiZ6bgmgh6LHHlWj@lucifer \
--to=ljs@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=imran.f.khan@oracle.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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