Skip to content

Commit ff03b88

Browse files
gerald-schaeferVasily Gorbik
authored andcommitted
s390/mm: remove useless hugepage address alignment
The failing address alignment to HPAGE_MASK in do_exception(), for hugetlb faults, was useless from the beginning. With 2 GB hugepage support it became wrong, but w/o further negative impact. Now it could have negative performance impact because it breaks the cacheline optimization for process_huge_page(). Therefore, remove it. Note that we still have failing address alignment by HW to PAGE_SIZE, for all page faults, not just hugetlb faults. So this patch will not fix UFFD_FEATURE_EXACT_ADDRESS for userfaultfd handling. It will just move the failing address for hugetlb faults a bit closer to the real address, at 4K page granularity, similar to normal page faults. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent b90cb10 commit ff03b88

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/s390/mm/fault.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,6 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
421421
if (unlikely(!(vma->vm_flags & access)))
422422
goto out_up;
423423

424-
if (is_vm_hugetlb_page(vma))
425-
address &= HPAGE_MASK;
426424
/*
427425
* If for any reason at all we couldn't handle the fault,
428426
* make sure we exit gracefully rather than endlessly redo

0 commit comments

Comments
 (0)