Re: [PATCH v2 3/7] mm: move vma_shrink(), vma_expand() to internal header

From: Vlastimil Babka
Date: Tue Jul 09 2024 - 06:50:04 EST


On 7/4/24 9:27 PM, Lorenzo Stoakes wrote:
> The vma_shrink() and vma_expand() functions are internal VMA manipulation
> functions which we ought to abstract for use outside of memory management
> code.
>
> To achieve this, we replace shift_arg_pages() in fs/exec.c with an
> invocation of a new relocate_vma_down() function implemented in mm/mmap.c,
> which enables us to also move move_page_tables() and vma_iter_prev_range()
> to internal.h.
>
> The purpose of doing this is to isolate key VMA manipulation functions in
> order that we can both abstract them and later render them easily testable.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>

Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>

Same nits about some "extern"s that could be removed in the process.