mbox series

[v1,0/2] mm/migrate: move NUMA hinting fault folio isolation + checks under PTL

Message ID 20240620212935.656243-1-david@redhat.com (mailing list archive)
Headers show
Series mm/migrate: move NUMA hinting fault folio isolation + checks under PTL | expand

Message

David Hildenbrand June 20, 2024, 9:29 p.m. UTC
Working on moving some mapcount related checks -- especially
folio_likely_mapped_shared() invocations -- under the PTL, where we are
sure the folio will remain mapped and the consequently the values are
actually expressive in current MM context, there are not that many
problematic bits to sort out.

This series tackles the NUMA hinting fault handling: we now perform checks
and folio isolation under PTL with the nice side effect that we have to
take less temporary folio references.

Did a quick test on a 2 socket system, NUMA hinting+migration on PTEs and
PMDs seems to continue working as expected.

Cc: Andrew Morton <akpm@linux-foundation.org>

David Hildenbrand (2):
  mm/migrate: make migrate_misplaced_folio() return 0 on success
  mm/migrate: move NUMA hinting fault folio isolation + checks under PTL

 include/linux/migrate.h |  7 ++++
 mm/huge_memory.c        | 13 ++++---
 mm/memory.c             | 11 +++---
 mm/migrate.c            | 81 +++++++++++++++++++----------------------
 4 files changed, 58 insertions(+), 54 deletions(-)


base-commit: a53138cdbe3ea8875405e96fa9cde64e24f4f9e1