From: Abel Wu <wuyun.abel@bytedance.com>
To: akpm@linux-foundation.org, lizefan.x@bytedance.com,
tj@kernel.org, hannes@cmpxchg.org, corbet@lwn.net
Cc: cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Abel Wu <wuyun.abel@bytedance.com>
Subject: [PATCH 3/3] docs/admin-guide/cgroup-v2: add cpuset.mems.migration
Date: Mon, 26 Apr 2021 14:59:46 +0800 [thread overview]
Message-ID: <20210426065946.40491-4-wuyun.abel@bytedance.com> (raw)
In-Reply-To: <20210426065946.40491-1-wuyun.abel@bytedance.com>
Add docs for new interface cpuset.mems.migration, most of which
are stolen from cpuset(7) manpages.
Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
---
Documentation/admin-guide/cgroup-v2.rst | 36 +++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index b1e81aa8598a..abf6589a390d 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -2079,6 +2079,42 @@ Cpuset Interface Files
Changing the partition state of an invalid partition root to
"member" is always allowed even if child cpusets are present.
+ cpuset.mems.migration
+ A read-write single value file which exists on non-root
+ cpuset-enabled cgroups.
+
+ Only the following migration modes are defined.
+
+ ======== ==========================================
+ "none" migration disabled [default]
+ "sync" move pages to cpuset nodes synchronously
+ "lazy" move pages to cpuset nodes on second touch
+ ======== ==========================================
+
+ By default, "none" mode is enabled. In this mode, once a page
+ is allocated (given a physical page of main memory) then that
+ page stays on whatever node it was allocated, so long as it
+ remains allocated, even if the cpusets memory placement policy
+ 'cpuset.mems' subsequently changes.
+
+ If "sync" mode is enabled in a cpuset, when the 'cpuset.mems'
+ setting is changed, any memory page in use by any process in
+ the cpuset that is on a memory node that is no longer allowed
+ will be migrated to a memory node that is allowed synchronously.
+ The relative placement of a migrated page within the cpuset is
+ preserved during these migration operations if possible.
+
+ The "lazy" mode is almost the same as "sync" mode, except that
+ it doesn't move the pages right away. Instead it sets these
+ pages to protnone, and numa faults triggered by second touching
+ these pages will handle the movement.
+
+ Furthermore, if a process is moved into a cpuset with migration
+ enabled ("sync" or "lazy" enabled), any memory pages it uses
+ that on memory nodes allowed in its previous cpuset, but which
+ are not allowed in its new cpuset, will be migrated to a memory
+ node allowed in the new cpuset.
+
Device controller
-----------------
--
2.31.1
next prev parent reply other threads:[~2021-04-26 7:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 6:59 [PATCH 0/3] cgroup2: introduce cpuset.mems.migration Abel Wu
2021-04-26 6:59 ` [PATCH 1/3] mm/mempolicy: apply cpuset limits to tasks using default policy Abel Wu
2021-04-26 6:59 ` [PATCH 2/3] cgroup/cpuset: introduce cpuset.mems.migration Abel Wu
2021-04-27 14:43 ` Tejun Heo
2021-04-28 7:24 ` Abel Wu
2021-05-05 5:06 ` [Phishing Risk] [External] " Abel Wu
2021-05-05 22:30 ` Johannes Weiner
2021-04-26 6:59 ` Abel Wu [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-22 9:06 [PATCH 0/3] cgroup2: " Abel Wu
2021-04-22 9:06 ` [PATCH 3/3] docs/admin-guide/cgroup-v2: add cpuset.mems.migration Abel Wu
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=20210426065946.40491-4-wuyun.abel@bytedance.com \
--to=wuyun.abel@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=tj@kernel.org \
/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).