[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4lnhlnaobt6cmhjsnhh5ul635bylwd55ha77ej3fgfhdy4k5cf@grchtd457dzc>
Date: Thu, 4 Sep 2025 16:53:55 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Yueyang Pan <pyyjason@...il.com>
Cc: Suren Baghdasaryan <surenb@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>, Vlastimil Babka <vbabka@...e.cz>, Michal Hocko <mhocko@...e.com>,
Brendan Jackman <jackmanb@...gle.com>, Johannes Weiner <hannes@...xchg.org>, Zi Yan <ziy@...dia.com>,
Vishal Moola <vishal.moola@...il.com>, Usama Arif <usamaarif642@...il.com>, linux-mm@...ck.org,
kernel-team@...a.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] mm/show_mem: Add trylock while printing alloc info
On Wed, Sep 03, 2025 at 04:16:14AM -0700, Yueyang Pan wrote:
> In production, show_mem() can be called concurrently from two
> different entities, for example one from oom_kill_process()
> another from __alloc_pages_slowpath from another kthread. This
> patch adds a spinlock and invokes trylock before printing out the
> kernel alloc info in show_mem(). This way two alloc info won't
> interleave with each other, which then makes parsing easier.
>
> Signed-off-by: Yueyang Pan <pyyjason@...il.com>
Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
Powered by blists - more mailing lists