Commit 4ea3594
khugepaged: optimize __collapse_huge_page_copy_succeeded() by PTE batching
Use PTE batching to batch process PTEs mapping the same large folio. An
improvement is expected due to batching refcount-mapcount manipulation on
the folios, and for arm64 which supports contig mappings, the number of
TLB flushes is also reduced.
Link: https://lkml.kernel.org/r/20250724052301.23844-3-dev.jain@arm.com
Signed-off-by: Dev Jain <dev.jain@arm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 3dfde97 commit 4ea3594
1 file changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
703 | 704 | | |
704 | | - | |
705 | 705 | | |
| 706 | + | |
| 707 | + | |
706 | 708 | | |
707 | | - | |
708 | | - | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
709 | 712 | | |
710 | 713 | | |
711 | 714 | | |
| |||
722 | 725 | | |
723 | 726 | | |
724 | 727 | | |
725 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
726 | 734 | | |
| 735 | + | |
| 736 | + | |
727 | 737 | | |
728 | 738 | | |
729 | 739 | | |
730 | 740 | | |
731 | 741 | | |
732 | 742 | | |
733 | | - | |
734 | | - | |
| 743 | + | |
| 744 | + | |
735 | 745 | | |
736 | | - | |
| 746 | + | |
| 747 | + | |
737 | 748 | | |
738 | 749 | | |
739 | 750 | | |
| |||
0 commit comments