mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
mm: show_mem: show number of zspages in show_free_areas
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> Acked-by: SeongJae Park <sj@kernel.org> Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Nhat Pham <nphamcs@gmail.com> Cc: Brendan Jackman <jackmanb@google.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
2a8f3f44f5
commit
0c83e7faa8
|
|
@ -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"
|
||||
|
|
@ -332,6 +333,11 @@ static void show_free_areas(unsigned int filter, nodemask_t *nodemask, int max_z
|
|||
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)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user