From: Matthew Wilcox <willy@infradead.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, muchun.song@linux.dev
Subject: Re: [PATCH v2 3/5] hugetlb: Pass struct vm_fault through to hugetlb_handle_userfault()
Date: Thu, 22 Feb 2024 03:41:48 +0000 [thread overview]
Message-ID: <ZdbCfLo85Gi_a7OI@casper.infradead.org> (raw)
In-Reply-To: <20240221234732.187629-4-vishal.moola@gmail.com>
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@gmail.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?
next prev parent reply other threads:[~2024-02-22 3:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 23:47 [PATCH v2 0/5] Handle hugetlb faults under the VMA lock Vishal Moola (Oracle)
2024-02-21 23:47 ` [PATCH v2 1/5] mm/memory: Change vmf_anon_prepare() to be non-static Vishal Moola (Oracle)
2024-02-22 3:31 ` Matthew Wilcox
2024-02-21 23:47 ` [PATCH v2 2/5] hugetlb: Move vm_struct declaration to the top of hugetlb_fault() Vishal Moola (Oracle)
2024-02-22 3:35 ` Matthew Wilcox
2024-02-21 23:47 ` [PATCH v2 3/5] hugetlb: Pass struct vm_fault through to hugetlb_handle_userfault() Vishal Moola (Oracle)
2024-02-22 3:41 ` Matthew Wilcox [this message]
2024-02-22 16:13 ` Vishal Moola
2024-02-21 23:47 ` [PATCH v2 4/5] hugetlb: Use vmf_anon_prepare() instead of anon_vma_prepare() Vishal Moola (Oracle)
2024-02-22 3:51 ` Matthew Wilcox
2024-02-21 23:47 ` [PATCH v2 5/5] hugetlb: Allow faults to be handled under the VMA lock Vishal Moola (Oracle)
2024-02-22 3:55 ` Matthew Wilcox
2024-02-22 17:27 ` Vishal Moola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZdbCfLo85Gi_a7OI@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=vishal.moola@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox