linux-stable/arch
Qi Zheng 18f3962953 mm: hugetlb: kill set_huge_swap_pte_at()
Commit e5251fd430 ("mm/hugetlb: introduce set_huge_swap_pte_at()
helper") add set_huge_swap_pte_at() to handle swap entries on
architectures that support hugepages consisting of contiguous ptes.  And
currently the set_huge_swap_pte_at() is only overridden by arm64.

set_huge_swap_pte_at() provide a sz parameter to help determine the number
of entries to be updated.  But in fact, all hugetlb swap entries contain
pfn information, so we can find the corresponding folio through the pfn
recorded in the swap entry, then the folio_size() is the number of entries
that need to be updated.

And considering that users will easily cause bugs by ignoring the
difference between set_huge_swap_pte_at() and set_huge_pte_at().  Let's
handle swap entries in set_huge_pte_at() and remove the
set_huge_swap_pte_at(), then we can call set_huge_pte_at() anywhere, which
simplifies our coding.

Link: https://lkml.kernel.org/r/20220626145717.53572-1-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-03 18:08:50 -07:00
..
alpha mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
arc mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
arm Merge branch 'master' into mm-stable 2022-06-27 10:31:34 -07:00
arm64 mm: hugetlb: kill set_huge_swap_pte_at() 2022-07-03 18:08:50 -07:00
csky mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
hexagon mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
ia64 mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
loongarch docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
m68k mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
microblaze mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
mips Merge branch 'master' into mm-stable 2022-06-27 10:31:34 -07:00
nios2 mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
openrisc mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
parisc Merge branch 'master' into mm-stable 2022-06-27 10:31:34 -07:00
powerpc docs: rename Documentation/vm to Documentation/mm 2022-06-27 12:52:53 -07:00
riscv Merge branch 'master' into mm-stable 2022-06-27 10:31:34 -07:00
s390 Merge branch 'master' into mm-stable 2022-06-27 10:31:34 -07:00
sh mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
sparc mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
um mm: avoid unnecessary page fault retires on shared memory types 2022-06-16 19:48:27 -07:00
x86 mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
xtensa Merge branch 'master' into mm-stable 2022-06-27 10:31:34 -07:00
.gitignore
Kconfig A set of objtool fixes: 2022-06-05 09:45:27 -07:00