[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yv3k2tpeloyqsncwicjq5yl7rd6ao3a6bd22bwh74bf5nbfocb@xnaurkrxq64k>
Date: Wed, 5 Mar 2025 13:02:15 -0800
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: SeongJae Park <sj@...nel.org>
Cc: "Liam R. Howlett" <howlett@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, David Hildenbrand <david@...hat.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, kernel-team@...a.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC PATCH 05/16] mm/madvise: define and use madvise_behavior
struct for madvise_do_behavior()
On Wed, Mar 05, 2025 at 10:16:00AM -0800, SeongJae Park wrote:
> To implement batched tlb flushes for MADV_DONTNEED[_LOCKED] and
> MADV_FREE, an mmu_gather object in addition to the behavior integer need
> to be passed to the internal logics. Define a struct for passing such
> information together with the behavior value without increasing number
> of parameters of all code paths towards the internal logic.
>
> Signed-off-by: SeongJae Park <sj@...nel.org>
> ---
> mm/madvise.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/mm/madvise.c b/mm/madvise.c
> index c5e1a4d1df72..3346e593e07d 100644
> --- a/mm/madvise.c
> +++ b/mm/madvise.c
> @@ -1665,9 +1665,15 @@ static bool is_memory_populate(int behavior)
> }
> }
>
> +struct madvise_behavior {
> + int behavior;
> +};
I think the patch 5 to 8 are just causing churn and will be much better
to be a single patch. Also why not make the above struct a general
madvise visit param struct which can be used by both
madvise_vma_anon_name() and madvise_vma_behavior()?
Powered by blists - more mailing lists