[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdbCfLo85Gi_a7OI@casper.infradead.org>
Date: Thu, 22 Feb 2024 03:41:48 +0000
From: Matthew Wilcox <willy@...radead.org>
To: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, muchun.song@...ux.dev
Subject: Re: [PATCH v2 3/5] hugetlb: Pass struct vm_fault through to
hugetlb_handle_userfault()
On Wed, Feb 21, 2024 at 03:47:30PM -0800, Vishal Moola (Oracle) wrote:
> Now that hugetlb_fault() has a struct vm_fault, have
> hugetlb_handle_userfault() use it instead of creating one of its own.
>
> This lets us reduce the number of arguments passed to
> hugetlb_handle_userfault() from 7 to 3, cleaning up the code and stack.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@...il.com>
> ---
> mm/hugetlb.c | 38 +++++++++-----------------------------
> 1 file changed, 9 insertions(+), 29 deletions(-)
I love the look of this ...
> @@ -6116,7 +6098,8 @@ static vm_fault_t hugetlb_no_page(struct mm_struct *mm,
> struct vm_area_struct *vma,
> struct address_space *mapping, pgoff_t idx,
> unsigned long address, pte_t *ptep,
> - pte_t old_pte, unsigned int flags)
> + pte_t old_pte, unsigned int flags,
> + struct vm_fault *vmf)
Should we remove vma, address, idx and flags?
Powered by blists - more mailing lists