Commit 6e00350
hugetlb: batch TLB flushes when freeing vmemmap
mainline inclusion
from mainline-v6.7-rc1
category: performance
Now that a list of pages is deduplicated at once, the TLB flush can be
batched for all vmemmap pages that got remapped.
Expand the flags field value to pass whether to skip the TLB flush on
remap of the PTE.
The TLB flush is global as we don't have guarantees from caller that the
set of folios is contiguous, or to add complexity in composing a list of
kVAs to flush.
Modified by Mike Kravetz to perform TLB flush on single folio if an
error is encountered.
Link: https://lkml.kernel.org/r/20231019023113.345257-8-mike.kravetz@oracle.com
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Barry Song <21cnbao@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: James Houghton <jthoughton@google.com>
Cc: Konrad Dybcio <konradybcio@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Usama Arif <usama.arif@bytedance.com>
Cc: Xiongchun Duan <duanxiongchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit f13b83f)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent e974dd0 commit 6e00350
1 file changed
Lines changed: 38 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
217 | | - | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| 360 | + | |
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
363 | | - | |
| 366 | + | |
| 367 | + | |
364 | 368 | | |
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
369 | 373 | | |
370 | | - | |
| 374 | + | |
371 | 375 | | |
372 | 376 | | |
373 | 377 | | |
| |||
629 | 633 | | |
630 | 634 | | |
631 | 635 | | |
632 | | - | |
| 636 | + | |
| 637 | + | |
633 | 638 | | |
634 | 639 | | |
635 | 640 | | |
| |||
640 | 645 | | |
641 | 646 | | |
642 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
643 | 660 | | |
644 | 661 | | |
645 | 662 | | |
| |||
651 | 668 | | |
652 | 669 | | |
653 | 670 | | |
654 | | - | |
655 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
656 | 674 | | |
657 | | - | |
658 | | - | |
| 675 | + | |
| 676 | + | |
659 | 677 | | |
660 | 678 | | |
661 | 679 | | |
| |||
674 | 692 | | |
675 | 693 | | |
676 | 694 | | |
677 | | - | |
| 695 | + | |
678 | 696 | | |
679 | 697 | | |
680 | 698 | | |
| |||
719 | 737 | | |
720 | 738 | | |
721 | 739 | | |
722 | | - | |
| 740 | + | |
| 741 | + | |
723 | 742 | | |
724 | 743 | | |
725 | 744 | | |
726 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
727 | 750 | | |
728 | 751 | | |
| 752 | + | |
729 | 753 | | |
730 | 754 | | |
731 | | - | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
732 | 758 | | |
733 | 759 | | |
734 | 760 | | |
| 761 | + | |
735 | 762 | | |
736 | 763 | | |
737 | 764 | | |
| |||
0 commit comments