linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] mm: thp: use generic THP migration for NUMA hinting fault
@ 2021-03-29 18:33 Yang Shi
  2021-03-29 18:33 ` [PATCH 1/6] mm: memory: add orig_pmd to struct vm_fault Yang Shi
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Yang Shi @ 2021-03-29 18:33 UTC (permalink / raw)
  To: mgorman, kirill.shutemov, ziy, mhocko, ying.huang, hughd, hca,
	gor, borntraeger, akpm
  Cc: shy828301, linux-mm, linux-s390, linux-kernel


When the THP NUMA fault support was added THP migration was not supported yet.
So the ad hoc THP migration was implemented in NUMA fault handling.  Since v4.14
THP migration has been supported so it doesn't make too much sense to still keep
another THP migration implementation rather than using the generic migration
code.  It is definitely a maintenance burden to keep two THP migration
implementation for different code paths and it is more error prone.  Using the
generic THP migration implementation allows us remove the duplicate code and
some hacks needed by the old ad hoc implementation.

A quick grep shows x86_64, PowerPC (book3s), ARM64 ans S390 support both THP
and NUMA balancing.  The most of them support THP migration except for S390.
Zi Yan tried to add THP migration support for S390 before but it was not
accepted due to the design of S390 PMD.  For the discussion, please see:
https://lkml.org/lkml/2018/4/27/953.

I'm not expert on S390 so not sure if it is feasible to support THP migration
for S390 or not.  If it is not feasible then the patchset may make THP NUMA
balancing not be functional on S390.  Not sure if this is a show stopper although
the patchset does simplify the code a lot.  Anyway it seems worth posting the
series to the mailing list to get some feedback.

Patch #1 ~ #3 are preparation and clean up patches.
Patch #4 is the real meat.
Patch #5 keep THP not split if migration is failed for NUMA hinting.
Patch #6 removes a hack about page refcount.

I saw there were some hacks about gup from git history, but I didn't figure out
if they have been removed or not since I just found FOLL_NUMA code in the current
gup implementation and they seems useful.


Yang Shi (6):
      mm: memory: add orig_pmd to struct vm_fault
      mm: memory: make numa_migrate_prep() non-static
      mm: migrate: teach migrate_misplaced_page() about THP
      mm: thp: refactor NUMA fault handling
      mm: migrate: don't split THP for misplaced NUMA page
      mm: migrate: remove redundant page count check for THP

 include/linux/huge_mm.h |   9 ++---
 include/linux/migrate.h |  29 ++-------------
 include/linux/mm.h      |   1 +
 mm/huge_memory.c        | 141 +++++++++++++++++++---------------------------------------------------
 mm/internal.h           |   3 ++
 mm/memory.c             |  33 ++++++++---------
 mm/migrate.c            | 190 ++++++++++++++---------------------------------------------------------------------------------
 7 files changed, 94 insertions(+), 312 deletions(-)



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

end of thread, other threads:[~2021-04-07 16:04 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 18:33 [RFC PATCH 0/6] mm: thp: use generic THP migration for NUMA hinting fault Yang Shi
2021-03-29 18:33 ` [PATCH 1/6] mm: memory: add orig_pmd to struct vm_fault Yang Shi
2021-03-29 18:33 ` [PATCH 2/6] mm: memory: make numa_migrate_prep() non-static Yang Shi
2021-03-29 18:33 ` [PATCH 3/6] mm: migrate: teach migrate_misplaced_page() about THP Yang Shi
2021-03-30  0:21   ` Huang, Ying
2021-03-30 16:57     ` Yang Shi
2021-03-29 18:33 ` [PATCH 4/6] mm: thp: refactor NUMA fault handling Yang Shi
2021-03-30  0:41   ` Huang, Ying
2021-03-30 17:02     ` Yang Shi
2021-03-29 18:33 ` [PATCH 5/6] mm: migrate: don't split THP for misplaced NUMA page Yang Shi
2021-03-30 14:42   ` Gerald Schaefer
2021-03-30 16:53     ` Yang Shi
2021-03-29 18:33 ` [PATCH 6/6] mm: migrate: remove redundant page count check for THP Yang Shi
2021-03-30 14:42 ` [RFC PATCH 0/6] mm: thp: use generic THP migration for NUMA hinting fault Gerald Schaefer
2021-03-30 16:51   ` Yang Shi
2021-03-31 11:47     ` Gerald Schaefer
2021-04-01 20:10       ` Yang Shi
2021-04-06 12:02         ` Gerald Schaefer
2021-04-06 16:42           ` Yang Shi
2021-04-07  8:32             ` Mel Gorman
2021-04-07 16:04               ` Yang Shi
2021-03-31 13:20   ` Mel Gorman
2021-04-01 20:12     ` Yang Shi

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).