* + mm-show_mem-show-number-of-zspages-in-show_free_areas.patch added to mm-new branch
@ 2025-09-01 19:02 Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2025-09-01 19:02 UTC (permalink / raw)
To: mm-commits, ziy, vbabka, surenb, mhocko, jackmanb, hannes,
cascardo, akpm
The patch titled
Subject: mm: show_mem: show number of zspages in show_free_areas
has been added to the -mm mm-new branch. Its filename is
mm-show_mem-show-number-of-zspages-in-show_free_areas.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-show_mem-show-number-of-zspages-in-show_free_areas.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Subject: mm: show_mem: show number of zspages in show_free_areas
Date: Mon, 1 Sep 2025 15:37:28 -0300
When OOM is triggered, it will show where the pages might be for each
zone. When using zram, 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
Link: https://lkml.kernel.org/r/20250901183729.3900578-1-cascardo@igalia.com
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/show_mem.c | 2 ++
1 file changed, 2 insertions(+)
--- a/mm/show_mem.c~mm-show_mem-show-number-of-zspages-in-show_free_areas
+++ a/mm/show_mem.c
@@ -310,6 +310,7 @@ static void show_free_areas(unsigned int
" inactive_file:%lukB"
" unevictable:%lukB"
" writepending:%lukB"
+ " zspages:%lukB"
" present:%lukB"
" managed:%lukB"
" mlocked:%lukB"
@@ -332,6 +333,7 @@ static void show_free_areas(unsigned int
K(zone_page_state(zone, NR_ZONE_INACTIVE_FILE)),
K(zone_page_state(zone, NR_ZONE_UNEVICTABLE)),
K(zone_page_state(zone, NR_ZONE_WRITE_PENDING)),
+ K(zone_page_state(zone, NR_ZSPAGES)),
K(zone->present_pages),
K(zone_managed_pages(zone)),
K(zone_page_state(zone, NR_MLOCK)),
_
Patches currently in -mm which might be from cascardo@igalia.com are
mm-page_alloc-only-set-alloc_highatomic-for-__gpf_high-allocations.patch
mm-show_mem-show-number-of-zspages-in-show_free_areas.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* + mm-show_mem-show-number-of-zspages-in-show_free_areas.patch added to mm-new branch
@ 2025-09-02 23:04 Andrew Morton
2025-09-04 2:24 ` Sergey Senozhatsky
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2025-09-02 23:04 UTC (permalink / raw)
To: mm-commits, ziy, vbabka, surenb, sj, senozhatsky, nphamcs,
minchan, mhocko, lorenzo.stoakes, jackmanb, hannes,
chengming.zhou, cascardo, akpm
The patch titled
Subject: mm: show_mem: show number of zspages in show_free_areas
has been added to the -mm mm-new branch. Its filename is
mm-show_mem-show-number-of-zspages-in-show_free_areas.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-show_mem-show-number-of-zspages-in-show_free_areas.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Subject: mm: show_mem: show number of zspages in show_free_areas
Date: Tue, 2 Sep 2025 09:49:21 -0300
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
Link: https://lkml.kernel.org/r/20250902-show_mem_zspages-v2-1-545daaa8b410@igalia.com
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Zi Yan <ziy@nvidia.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/show_mem.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/mm/show_mem.c~mm-show_mem-show-number-of-zspages-in-show_free_areas
+++ a/mm/show_mem.c
@@ -310,6 +310,7 @@ static void show_free_areas(unsigned int
" inactive_file:%lukB"
" unevictable:%lukB"
" writepending:%lukB"
+ " zspages:%lukB"
" present:%lukB"
" managed:%lukB"
" mlocked:%lukB"
@@ -332,6 +333,11 @@ static void show_free_areas(unsigned int
K(zone_page_state(zone, NR_ZONE_INACTIVE_FILE)),
K(zone_page_state(zone, NR_ZONE_UNEVICTABLE)),
K(zone_page_state(zone, NR_ZONE_WRITE_PENDING)),
+#if IS_ENABLED(CONFIG_ZSMALLOC)
+ K(zone_page_state(zone, NR_ZSPAGES)),
+#else
+ 0UL,
+#endif
K(zone->present_pages),
K(zone_managed_pages(zone)),
K(zone_page_state(zone, NR_MLOCK)),
_
Patches currently in -mm which might be from cascardo@igalia.com are
mm-page_alloc-only-set-alloc_highatomic-for-__gpf_high-allocations.patch
mm-show_mem-show-number-of-zspages-in-show_free_areas.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + mm-show_mem-show-number-of-zspages-in-show_free_areas.patch added to mm-new branch
2025-09-02 23:04 Andrew Morton
@ 2025-09-04 2:24 ` Sergey Senozhatsky
0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2025-09-04 2:24 UTC (permalink / raw)
To: Andrew Morton
Cc: mm-commits, ziy, vbabka, surenb, sj, senozhatsky, nphamcs,
minchan, mhocko, lorenzo.stoakes, jackmanb, hannes,
chengming.zhou, cascardo
On (25/09/02 16:04), Andrew Morton 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
>
> Link: https://lkml.kernel.org/r/20250902-show_mem_zspages-v2-1-545daaa8b410@igalia.com
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-04 2:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01 19:02 + mm-show_mem-show-number-of-zspages-in-show_free_areas.patch added to mm-new branch Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2025-09-02 23:04 Andrew Morton
2025-09-04 2:24 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).