diff options
| author | Ye Liu <liuye@kylinos.cn> | 2026-09-15 10:43:32 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-09-29 23:13:27 -0700 |
| commit | aff77f5e396b4cbb523504a3bb4700d19c0102c8 (patch) | |
| tree | 4d82b141b325ed4751b9ff22c580747911808e30 | |
| parent | 944ea0d1884cadeb5b0b60136722acf23af28431 (diff) | |
| download | linux-next-aff77f5e396b4cbb523504a3bb4700d19c0102c8.tar.gz linux-next-aff77f5e396b4cbb523504a3bb4700d19c0102c8.zip | |
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>
| -rw-r--r-- | mm/vmalloc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index f0a1cc07c337..2d29b08f263a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -5344,7 +5344,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; @@ -5414,12 +5414,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; } |
