mm/vmalloc: extract show_busy_info from vmalloc_info_show

Extract the busy vmap area iteration into show_busy_info, mirroring
the existing show_purge_info pattern.

Link: https://lore.kernel.org/20260915-vmalloc_study-v2-3-cc4dfe635e22@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
This commit is contained in:
Ye Liu 2026-09-15 10:43:32 +08:00 committed by Andrew Morton
parent c10ed0f231
commit 3b23842264

View File

@ -5331,7 +5331,7 @@ static void show_purge_info(struct seq_file *m)
}
}
static int vmalloc_info_show(struct seq_file *m, void *p)
static void show_busy_info(struct seq_file *m)
{
struct vmap_node *vn;
struct vmap_area *va;
@ -5401,12 +5401,18 @@ static int vmalloc_info_show(struct seq_file *m, void *p)
spin_unlock(&vn->busy.lock);
}
if (IS_ENABLED(CONFIG_NUMA))
kfree(counters);
}
static int vmalloc_info_show(struct seq_file *m, void *p)
{
show_busy_info(m);
/*
* As a final step, dump "unpurged" areas.
*/
show_purge_info(m);
if (IS_ENABLED(CONFIG_NUMA))
kfree(counters);
return 0;
}