[RFC PATCH 0/3] mm: PTEs batch optimization in mincore and mremap

Zhang Qilong posted 3 patches 3 months, 1 week ago
mm/internal.h | 76 +++++++++++++++++++++++++++++++++++++++------------
mm/mincore.c  | 10 ++-----
mm/mremap.c   | 16 ++---------
3 files changed, 64 insertions(+), 38 deletions(-)
[RFC PATCH 0/3] mm: PTEs batch optimization in mincore and mremap
Posted by Zhang Qilong 3 months, 1 week ago
This first patch extract a new interface named can_pte_batch_count()
from folio_pte_batch_flags() for pte batch. Thew new interface avoids
folio access, and counts more pte, not just limited to entries mapped
within a single folio. Caller need pass a range within a single VMA
and a single page and it detect consecutive (present) PTEs that map
consecutive pages. The 2th and 3rd patches use can_pte_batch_count()
do pte batch.

Zhang Qilong (3):
  mm: Introduce can_pte_batch_count() for PTEs batch optimization.
  mm/mincore: Use can_pte_batch_count() in mincore_pte_range() for pte
    batch mincore_pte_range()
  mm/mremap: Use can_pte_batch_count() instead of folio_pte_batch() for
    pte batch

 mm/internal.h | 76 +++++++++++++++++++++++++++++++++++++++------------
 mm/mincore.c  | 10 ++-----
 mm/mremap.c   | 16 ++---------
 3 files changed, 64 insertions(+), 38 deletions(-)

-- 
2.43.0