mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
c10ed0f231
commit
3b23842264
12
mm/vmalloc.c
12
mm/vmalloc.c
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user