[PATCH v2 0/3] Hugetlb fault path to use struct vm_fault

Vishal Moola (Oracle) posted 3 patches 1 year, 10 months ago
mm/hugetlb.c | 194 +++++++++++++++++++++++++--------------------------
1 file changed, 95 insertions(+), 99 deletions(-)
[PATCH v2 0/3] Hugetlb fault path to use struct vm_fault
Posted by Vishal Moola (Oracle) 1 year, 10 months ago
This patchset converts the hugetlb fault path to use struct vm_fault.
This helps make the code more readable, and alleviates the stack by
allowing us to consolidate many fault-related variables into an
individual pointer.
----
v2:
  - renamed patchset from 'Define struct vm_fault in handle_mm_fault()'
  - Dropped patches 4/5 - These allowed vmf->{address,pgoff} to be
    modified, but that allows misuse of these fields. Converting hugetlb
    to using the same address/pgoff as generic mm is not simple, so that
    can be done later.

Vishal Moola (Oracle) (3):
  hugetlb: Convert hugetlb_fault() to use struct vm_fault
  hugetlb: Convert hugetlb_no_page() to use struct vm_fault
  hugetlb: Convert hugetlb_wp() to use struct vm_fault

 mm/hugetlb.c | 194 +++++++++++++++++++++++++--------------------------
 1 file changed, 95 insertions(+), 99 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/3] Hugetlb fault path to use struct vm_fault
Posted by Andrew Morton 1 year, 10 months ago
On Mon,  1 Apr 2024 13:26:48 -0700 "Vishal Moola (Oracle)" <vishal.moola@gmail.com> wrote:

> This patchset converts the hugetlb fault path to use struct vm_fault.
> This helps make the code more readable, and alleviates the stack by
> allowing us to consolidate many fault-related variables into an
> individual pointer.

The .text shrunk a little.  x86_64 defconfig:

 52873	   4015	  13796	  70684	  1141c	mm/hugetlb.o-before
 52617	   4015	  13796	  70428	  1131c	mm/hugetlb.o-after