Re: [PATCH v2 3/5] mm/madvise: thread VMA range state through madvise_behavior
From: Barry Song
Date: Mon Jun 23 2025 - 21:05:45 EST
On Sat, Jun 21, 2025 at 3:33 AM Lorenzo Stoakes
<lorenzo.stoakes@xxxxxxxxxx> wrote:
>
> Rather than updating start and a confusing local parameter 'tmp' in
> madvise_walk_vmas(), instead store the current range being operated upon in
> the struct madvise_behavior helper object in a range pair and use this
> consistently in all operations.
>
> This makes it clearer what is going on and opens the door to further
> cleanup now we store state regarding what is currently being operated upon
> here.
>
> Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> ---
> mm/madvise.c | 103 ++++++++++++++++++++++++++++-----------------------
> 1 file changed, 57 insertions(+), 46 deletions(-)
>
Reviewed-by: Barry Song <baohua@xxxxxxxxxx>
Best Regards
Barry