linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] make the hugetlb migration strategy consistent
@ 2024-02-27 13:52 Baolin Wang
  2024-02-27 13:52 ` [PATCH 1/3] mm: record the migration reason for struct migration_target_control Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Baolin Wang @ 2024-02-27 13:52 UTC (permalink / raw)
  To: akpm
  Cc: muchun.song, osalvador, david, linmiaohe, naoya.horiguchi,
	mhocko, baolin.wang, linux-mm, linux-kernel

Hi,

As discussed in previous thread [1], there is an inconsistency when handling
hugetlb migration. When handling the migration of freed hugetlb, it prevents
fallback to other NUMA nodes in alloc_and_dissolve_hugetlb_folio(). However,
when dealing with in-use hugetlb, it allows fallback to other NUMA nodes in
alloc_hugetlb_folio_nodemask(), which can break the per-node hugetlb pool
and might result in unexpected failures when node bound workloads doesn't get
what is asssumed available.

This patch set tries to make the hugetlb migration strategy more clear
and consistent. Please find details in each patch.

[1]
https://lore.kernel.org/all/6f26ce22d2fcd523418a085f2c588fe0776d46e7.1706794035.git.baolin.wang@linux.alibaba.com/

Changes from RFC:
 - Move the gfp modification into alloc_migrate_hugetlb_folio().
 - Add more comments.

Baolin Wang (3):
  mm: record the migration reason for struct migration_target_control
  mm: hugetlb: make the hugetlb migration strategy consistent
  docs: hugetlbpage.rst: add hugetlb migration description

 Documentation/admin-guide/mm/hugetlbpage.rst |  7 ++++
 include/linux/hugetlb.h                      |  4 +-
 mm/gup.c                                     |  1 +
 mm/hugetlb.c                                 | 39 ++++++++++++++++++--
 mm/internal.h                                |  1 +
 mm/memory-failure.c                          |  1 +
 mm/memory_hotplug.c                          |  1 +
 mm/mempolicy.c                               |  3 +-
 mm/migrate.c                                 |  3 +-
 mm/page_alloc.c                              |  1 +
 mm/vmscan.c                                  |  3 +-
 11 files changed, 55 insertions(+), 9 deletions(-)

-- 
2.39.3



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-06  8:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 13:52 [PATCH 0/3] make the hugetlb migration strategy consistent Baolin Wang
2024-02-27 13:52 ` [PATCH 1/3] mm: record the migration reason for struct migration_target_control Baolin Wang
2024-02-27 15:10   ` Oscar Salvador
2024-02-28  7:40     ` Baolin Wang
2024-02-27 13:52 ` [PATCH 2/3] mm: hugetlb: make the hugetlb migration strategy consistent Baolin Wang
2024-02-27 15:17   ` Oscar Salvador
2024-02-28  7:40     ` Baolin Wang
2024-02-28  8:41       ` Oscar Salvador
2024-03-06  8:35         ` Baolin Wang
2024-03-06  8:46           ` Oscar Salvador
2024-03-06  8:58             ` Baolin Wang
2024-02-27 13:52 ` [PATCH 3/3] docs: hugetlbpage.rst: add hugetlb migration description Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).