aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/controller/pci-versatile.c
diff options
context:
space:
mode:
authorMike Kravetz <mike.kravetz@oracle.com>2022-05-24 13:50:03 -0700
committerakpm <akpm@linux-foundation.org>2022-05-27 08:55:17 -0700
commit48381273f8734d28ef56a5bdf1966dd8530111bc (patch)
tree4db0488414964522d1843f5ba6a7c0c1a92f0f18 /drivers/pci/controller/pci-versatile.c
parent2505a981114dcb715f8977b8433f7540854851d8 (diff)
hugetlb: fix huge_pmd_unshare address update
The routine huge_pmd_unshare() is passed a pointer to an address associated with an area which may be unshared. If unshare is successful this address is updated to 'optimize' callers iterating over huge page addresses. For the optimization to work correctly, address should be updated to the last huge page in the unmapped/unshared area. However, in the common case where the passed address is PUD_SIZE aligned, the address is incorrectly updated to the address of the preceding huge page. That wastes CPU cycles as the unmapped/unshared range is scanned twice. Link: https://lkml.kernel.org/r/20220524205003.126184-1-mike.kravetz@oracle.com Fixes: 39dde65c9940 ("shared page table for hugetlb page") Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Acked-by: Muchun Song <songmuchun@bytedance.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/pci/controller/pci-versatile.c')
0 files changed, 0 insertions, 0 deletions