Re: [PATCH v2 1/2] mm/vmalloc: extract vmalloc_free_pages() helper from vfree()

From: Alice Ryhl

Date: Wed Mar 04 2026 - 16:47:14 EST


On Wed, Mar 04, 2026 at 08:23:15PM +0530, Shivam Kalra via B4 Relay wrote:
> From: Shivam Kalra <shivamkalra98@xxxxxxxxxxx>
>
> Extract the page-freeing loop and NR_VMALLOC stat accounting from
> vfree() into a reusable vmalloc_free_pages() helper. The helper operates
> on a range [start, end) of pages from a vm_struct, making it suitable
> for both full free (vfree) and partial free (upcoming vrealloc shrink).
>
> No functional change.
>
> Signed-off-by: Shivam Kalra <shivamkalra98@xxxxxxxxxxx>

> - /*
> - * High-order allocs for huge vmallocs are split, so
> - * can be freed as an array of order-0 allocations
> - */
> - if (!(vm->flags & VM_MAP_PUT_PAGES))
> - mod_lruvec_page_state(page, NR_VMALLOC, -1);

Any reason this comment was dropped?

Alice