From: Nhat Pham <nphamcs@gmail.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
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>,
Minchan Kim <minchan@kernel.org>,
Yosry Ahmed <yosry.ahmed@linux.dev>,
Chengming Zhou <chengming.zhou@linux.dev>,
SeongJae Park <sj@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-dev@igalia.com
Subject: Re: [PATCH v2] mm: show_mem: show number of zspages in show_free_areas
Date: Fri, 5 Sep 2025 10:46:29 -0700 [thread overview]
Message-ID: <CAKEwX=NE3ngvFnyHQTAofX3M08JkeZZcfaKi_mkOUuiB4zh6Dg@mail.gmail.com> (raw)
In-Reply-To: <paef7bzotb4runl4sjlcfesano36cc2bflb7uqe5mil3chnpgn@axng3yfe33w6>
On Wed, Sep 3, 2025 at 11:44 PM Sergey Senozhatsky
<senozhatsky@chromium.org> wrote:
>
> On (25/09/02 09:49), Thadeu Lima de Souza Cascardo wrote:
> > When OOM is triggered, it will show where the pages might be for each zone.
> > When using zram or zswap, it might look like lots of pages are missing.
> > After this patch, zspages are shown as below.
> >
> > [ 48.792859] Node 0 DMA free:2812kB boost:0kB min:60kB low:72kB high:84kB reserved_highatomic:0KB free_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB zspages:11160kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
> > [ 48.792962] lowmem_reserve[]: 0 956 956 956 956
> > [ 48.792988] Node 0 DMA32 free:3512kB boost:0kB min:3912kB low:4888kB high:5864kB reserved_highatomic:0KB free_highatomic:0KB active_anon:0kB inactive_anon:28kB active_file:8kB inactive_file:16kB unevictable:0kB writepending:0kB zspages:916780kB present:1032064kB managed:978944kB mlocked:0kB bounce:0kB free_pcp:500kB local_pcp:248kB free_cma:0kB
> > [ 48.793118] lowmem_reserve[]: 0 0 0 0 0
> >
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
> > ---
> > v2:
> > - fix build when CONFIG_ZSMALLOC is not enabled
> > ---
> > mm/show_mem.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/mm/show_mem.c b/mm/show_mem.c
> > index 41999e94a56d623726ea92f3f38785e8b218afe5..c563d9adfa87765a8736e91c1f68d824b03eaea8 100644
> > --- a/mm/show_mem.c
> > +++ b/mm/show_mem.c
> > @@ -310,6 +310,7 @@ static void show_free_areas(unsigned int filter, nodemask_t *nodemask, int max_z
> > " inactive_file:%lukB"
> > " unevictable:%lukB"
> > " writepending:%lukB"
> > + " zspages:%lukB"
> > " present:%lukB"
> > " managed:%lukB"
> > " mlocked:%lukB"
>
> A little "preliminary optimization" idea: do we want to specifically
> refer to it as "zspages" or do we want a more generic term, just in
> case if zsmalloc goes away, or if there is (are) another allocator(s)
> for compressed swaps?
Hmmm, zpage? z is a common prefix for "compressed".
I'm honestly fine with zspage though. We can just have any new
allocator call it zspage too ;)
next prev parent reply other threads:[~2025-09-05 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 12:49 Thadeu Lima de Souza Cascardo
2025-09-02 13:12 ` Lorenzo Stoakes
2025-09-02 13:54 ` Vlastimil Babka
2025-09-02 16:01 ` Zi Yan
2025-09-03 1:31 ` SeongJae Park
2025-09-03 1:39 ` Chengming Zhou
2025-09-04 6:39 ` Johannes Weiner
2025-09-04 6:44 ` Sergey Senozhatsky
2025-09-05 17:46 ` Nhat Pham [this message]
2025-09-05 17:43 ` Nhat Pham
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='CAKEwX=NE3ngvFnyHQTAofX3M08JkeZZcfaKi_mkOUuiB4zh6Dg@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cascardo@igalia.com \
--cc=chengming.zhou@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=yosry.ahmed@linux.dev \
--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