On 6/27/22 20:04, Matthew Wilcox wrote: > On Mon, Jun 27, 2022 at 01:05:00PM +0530, Anshuman Khandual wrote: >>> For the swap entry of hugetlb, we need to remember that we should >>> call set_huge_swap_pte_at() instead of set_huge_pte_at() every >> >> Which is intuitive, so what is the problem ? > > The problem is that HugeTLB is DIFFERENT from the rest of the VM. Agreed. > This has a huge cost in programmer time, which is infinitely more > valuable than the cycle shaving you're quibbling over. We should take > any and every opportunity to make huge pages work the same way as THP > and order-0 pages. Got it.