Skip to content

RFC Fix and refactor do_{huge_pmd_}numa_page()

Zi Yan linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3memory tiering: read last_cpupid correctly in do_huge_pmd_numa_page()mm/huge_memory.c+2 -15 replies
2/3memory tiering: introduce folio_has_cpupid() checkinclude/linux/memory-tiers.h kernel/sched/fair.c mm/huge_memory.c +3 more+30 -101 reply
3/3mm/migrate: move common code to numa_migrate_check (was numa_migrate_prep)mm/huge_memory.c mm/internal.h mm/memory.c+52 -628 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchHuang, YingBaolin WangDavid Hildenbrand
1/3R-b R-b A-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Fix and refactor do_{huge_pmd_}numa_page()

From: Zi Yan <[email protected]>

First patch adds the missing sysctl_numa_balancing_mode check. Second patch introduces folio_has_cpupid() to replace open coded folio last_cpupid check. Third patch consolidates code in do_numa_page() and do_huge_pmd_numa_page() by moving more common code into numa_migrate_prep() (renamed to numa_migrate_check() in the patch).

The RFC is mainly for third patch. It changes the original code behavior:
1. do_huge_pmd_numa_page() did not check shared folios to set TNF_SHARED.
2. do_huge_pmd_numa_page() did not check and skip zone device folios.

Zi Yan (3):
memory tiering: read last_cpupid correctly in do_huge_pmd_numa_page() memory tiering: introduce folio_has_cpupid() check mm/migrate: move common code to numa_migrate_check (was
numa_migrate_prep)

 include/linux/memory-tiers.h |  8 ++++
 kernel/sched/fair.c          |  3 +-
 mm/huge_memory.c             | 31 +++++---------
 mm/internal.h                |  5 ++-
 mm/memory-tiers.c            | 17 ++++++++
 mm/memory.c                  | 82 +++++++++++++++++-------------------
 mm/mprotect.c                |  3 +-
 7 files changed, 80 insertions(+), 69 deletions(-)
Signature · 1 line
2.43.0