Skip to content

Page demotion for memory reclaim

Keith Busch linux-mm linux-nvdimm lkml nvdimm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5node: Define and export memory migration pathDocumentation/ABI/stable/sysfs-devices-node drivers/base/node.c include/linux/node.h+89 -10 replies
2/5mm: Split handling old page for migrationmm/migrate.c+61 -540 replies
3/5mm: Attempt to migrate page in lieu of discardinclude/linux/migrate.h include/trace/events/migrate.h mm/debug.c +2 more+69 -12 replies
4/5mm: Consider anonymous pages without swapinclude/linux/swap.h mm/vmscan.c+25 -50 replies
5/5mm/migrate: Add page movement trace eventinclude/trace/events/migrate.h mm/migrate.c+27 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Page demotion for memory reclaim

The kernel has recently added support for using persistent memory as normal RAM:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c221c0b0308fd01d9fb33a16f64d2fd95f8830a4

The persistent memory is hot added to nodes separate from other memory types, which makes it convenient to make node based memory policies.

When persistent memory provides a larger and cheaper address space, but with slower access characteristics than system RAM, we'd like the kernel to make use of these memory-only nodes as a migration tier for pages that would normally be discared during memory reclaim. This is faster than doing IO for swap or page cache, and makes better utilization of available physical address space.

The feature is not enabled by default. The user must opt-in to kernel managed page migration by defining the demotion path. In the future, we may want to have the kernel automatically create this based on heterogeneous memory attributes and CPU locality.

Keith Busch (5):
node: Define and export memory migration path
mm: Split handling old page for migration
mm: Attempt to migrate page in lieu of discard
mm: Consider anonymous pages without swap
mm/migrate: Add page movement trace event

 Documentation/ABI/stable/sysfs-devices-node |  11 +-
 drivers/base/node.c                         |  73 +++++++++++++
 include/linux/migrate.h                     |   6 ++
 include/linux/node.h                        |   6 ++
 include/linux/swap.h                        |  20 ++++
 include/trace/events/migrate.h              |  29 ++++-
 mm/debug.c                                  |   1 +
 mm/migrate.c                                | 161 ++++++++++++++++++----------
 mm/vmscan.c                                 |  25 ++++-
 9 files changed, 271 insertions(+), 61 deletions(-)
Signature · 1 line
2.14.4