commit | e5251fd43007f9e1155331f0fa30685604a8e3a1 | [log] [tgz] |
---|---|---|
author | Punit Agrawal <[email protected]> | Thu Jul 06 15:39:50 2017 -0700 |
committer | Linus Torvalds <[email protected]> | Thu Jul 06 16:24:34 2017 -0700 |
tree | 380002511e7dec6edf00242df7c18f900eb74d32 | |
parent | 9386fac34c7cbe39013410b01348e284652ca1cf [diff] |
mm/hugetlb: introduce set_huge_swap_pte_at() helper set_huge_pte_at(), an architecture callback to populate hugepage ptes, does not provide the range of virtual memory that is targeted. This leads to ambiguity when dealing with swap entries on architectures that support hugepages consisting of contiguous ptes. Fix the problem by introducing an overridable helper that is called when populating the page tables with swap entries. The size of the targeted region is provided to the helper to help determine the number of entries to be updated. Provide a default implementation that maintains the current behaviour. [[email protected]: v4] Link: http://lkml.kernel.org/r/[email protected] [[email protected]: add an empty definition for set_huge_swap_pte_at()] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Punit Agrawal <[email protected]> Acked-by: Steve Capper <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: "Aneesh Kumar K.V" <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>