linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jagdish Gediya <jvgediya@linux.ibm.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org
Cc: baolin.wang@linux.alibaba.com, dave.hansen@linux.intel.com,
	ying.huang@intel.com, aneesh.kumar@linux.ibm.com,
	shy828301@gmail.com, weixugc@google.com, gthelen@google.com,
	dan.j.williams@intel.com, Jagdish Gediya <jvgediya@linux.ibm.com>
Subject: [PATCH v3 7/7] docs: numa: Add documentation for demotion
Date: Sat, 23 Apr 2022 01:25:16 +0530	[thread overview]
Message-ID: <20220422195516.10769-8-jvgediya@linux.ibm.com> (raw)
In-Reply-To: <20220422195516.10769-1-jvgediya@linux.ibm.com>

Add documentation for demotion mentioning about why is it
required and all the sysfs interfaces available related to
demotion.

Signed-off-by: Jagdish Gediya <jvgediya@linux.ibm.com>
---
 Documentation/admin-guide/mm/index.rst        |  1 +
 .../admin-guide/mm/numa_demotion.rst          | 57 +++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 Documentation/admin-guide/mm/numa_demotion.rst

diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst
index c21b5823f126..4bd0ed3de9c5 100644
--- a/Documentation/admin-guide/mm/index.rst
+++ b/Documentation/admin-guide/mm/index.rst
@@ -34,6 +34,7 @@ the Linux memory management.
    memory-hotplug
    nommu-mmap
    numa_memory_policy
+   numa_demotion
    numaperf
    pagemap
    soft-dirty
diff --git a/Documentation/admin-guide/mm/numa_demotion.rst b/Documentation/admin-guide/mm/numa_demotion.rst
new file mode 100644
index 000000000000..252be9dc0517
--- /dev/null
+++ b/Documentation/admin-guide/mm/numa_demotion.rst
@@ -0,0 +1,57 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+==================
+NUMA Demotion
+==================
+
+What is demotion required?
+============================
+
+With the advent of various new memory types, Systems have multiple
+types of memory, e.g. DRAM and PMEM (persistent memory).  The memory
+subsystem of such systems can be called memory tiering system,
+because the performance of the different types of memory are usually
+different.
+
+In a  system with some DRAM and some persistent memory, once DRAM
+fills up, reclaim will start and some of the DRAM contents will be
+thrown out to swap even if there is space in persistent memory.
+Allocations will, at some point, start falling over to the slower
+persistent memory.
+
+Instead of page being discarded during reclaim, it can be moved to
+persistent memory. Allowing page migration during reclaim enables
+these systems to migrate pages from fast tiers to slow tiers when
+the fast tier is under pressure.
+
+SYSFS interface
+======================
+
+Enable/Disable demotion
+------------------------
+
+By default demotion is disabled, it can be enabled/disabled using below
+sysfs interface,
+
+echo 0/1 or false/true > /sys/kernel/mm/numa/demotion_enabled
+
+Read system demotion targets
+-----------------------------
+cat /sys/devices/system/node/demotion_targets
+
+Kernel shows node_states[N_DEMOTION_TARGETS] when this command
+is run.
+
+Override default demotion targets
+---------------------------------
+echo <nodelist> > /sys/devices/system/node/demotion_targets
+
+If nodelist is valid and subset of N_MEMORY then
+node_states[N_DEMOTION_TARGETS] is set to this new nodelist, and
+kernel builds the new demotion list based on it.
+
+Read per node demotion targets
+-------------------------------
+cat /sys/devices/system/node/nodeX/demotion_targets
+
+It shows per node demotion targets configured by kernel.
-- 
2.35.1



  parent reply	other threads:[~2022-04-22 19:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 19:55 [PATCH v3 0/7] mm: demotion: Introduce new node state N_DEMOTION_TARGETS Jagdish Gediya
2022-04-22 19:55 ` [PATCH v3 1/7] mm: demotion: Fix demotion targets sharing among sources Jagdish Gediya
2022-04-24  3:25   ` ying.huang
2022-04-25  9:32     ` Jagdish Gediya
2022-04-26  7:26       ` ying.huang
2022-04-22 19:55 ` [PATCH v3 2/7] mm: demotion: Add new node state N_DEMOTION_TARGETS Jagdish Gediya
2022-04-22 20:29   ` Wei Xu
2022-04-22 19:55 ` [PATCH v3 3/7] drivers/base/node: Add support to write node_states[] via sysfs Jagdish Gediya
2022-04-22 20:32   ` Wei Xu
2022-04-24  6:25   ` Aneesh Kumar K.V
2022-04-25  9:42     ` Jagdish Gediya
2022-04-24  6:29   ` ying.huang
2022-04-22 19:55 ` [PATCH v3 4/7] device-dax/kmem: Set node state as N_DEMOTION_TARGETS Jagdish Gediya
2022-04-22 20:34   ` Wei Xu
2022-04-22 19:55 ` [PATCH v3 5/7] mm: demotion: Build demotion list based on N_DEMOTION_TARGETS Jagdish Gediya
2022-04-22 20:39   ` Wei Xu
2022-04-22 19:55 ` [PATCH v3 6/7] mm: demotion: expose per-node demotion targets via sysfs Jagdish Gediya
2022-04-22 20:47   ` Wei Xu
2022-04-23  7:30   ` kernel test robot
2022-04-23  8:38   ` kernel test robot
2022-04-22 19:55 ` Jagdish Gediya [this message]
2022-04-24  3:19 ` [PATCH v3 0/7] mm: demotion: Introduce new node state N_DEMOTION_TARGETS ying.huang
2022-04-25 11:15   ` Jagdish Gediya
2022-04-25 13:57     ` Jonathan Cameron
2022-04-25 14:44       ` Aneesh Kumar K V
2022-04-26 10:43         ` Jonathan Cameron
2022-04-27  1:29         ` ying.huang
2022-04-27  2:57           ` Aneesh Kumar K V
2022-04-27  3:34             ` ying.huang
2022-04-25 14:53       ` Aneesh Kumar K V
2022-04-26 10:37         ` Jonathan Cameron
2022-04-26  7:55     ` ying.huang
2022-04-26  9:07       ` Aneesh Kumar K V
2022-04-26  9:10         ` ying.huang
2022-04-26  9:37       ` Jagdish Gediya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220422195516.10769-8-jvgediya@linux.ibm.com \
    --to=jvgediya@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shy828301@gmail.com \
    --cc=weixugc@google.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).