From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8F3FC433ED for ; Thu, 22 Apr 2021 09:06:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4EF0661458 for ; Thu, 22 Apr 2021 09:06:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EF0661458 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CC1816B007D; Thu, 22 Apr 2021 05:06:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C4CC36B007E; Thu, 22 Apr 2021 05:06:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B12216B0080; Thu, 22 Apr 2021 05:06:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 8F4FA6B007D for ; Thu, 22 Apr 2021 05:06:25 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4E1BD180ACF16 for ; Thu, 22 Apr 2021 09:06:25 +0000 (UTC) X-FDA: 78059421930.14.42A5DB1 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by imf11.hostedemail.com (Postfix) with ESMTP id 64F7B2000242 for ; Thu, 22 Apr 2021 09:06:11 +0000 (UTC) Received: by mail-pf1-f173.google.com with SMTP id 10so22337248pfl.1 for ; Thu, 22 Apr 2021 02:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SfF/Z0ScslK5LaLkBhpaNHR++tEupceqm51lspaZqiM=; b=DDJ1gaaHVhTnJEYif/PYB82fh8uyWeB0mKRq575+v9VXDwnUsvR0QZrLWnxhvjzeKP GBvaClcBVchRRh34BoRsfFf/JWIhLmVsBHRGBlfCpxnj3LFsc9mZ9E16wl3fhjnx0PwI YML3XbmzkG6cmYHj4FydNXJewHjMOjfmq9jPXRqt05Ktm5GVHcWQQJxN7gRVaN01chh7 VlB5G0U1VIGpRexa5T40CJpjITNHl/c/2zMpH5u3Smlih3z8dkCcp0EnuCh3ymT06htv dsBv1yoDXNEaPYqKFMIKnRDUmHgudqSxqy8zkT1AR5nLtXTOW/0Gf+G6hEN5rC3/u7t7 Kb5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SfF/Z0ScslK5LaLkBhpaNHR++tEupceqm51lspaZqiM=; b=FNyh4/Ov3/oVwVsz44uKwSr89b+5w5MKRaRcHssLkk73k47FhPPp4nZJ2Qp1+ZHaFy 4ZQc96PA0vobWz8l9MFfnI8joYrYMRzna/ZiUUNUaCqa0g+0Yy3r1Rh7PENdHCf6Hlv9 dg3Zns9uRiatvbzIev2PwZ92PjX57SEmUhce6S5RaffrRVUQnvn9S+CZsXr5brjy816E 13oIx1K6kn+efUAPKWsAvBsVEXBUTc9urDoPwwBUMvqRhjyxge55cD1klgm12lLLGGM9 sS3y2s3Sab9W2tgAbbQZ+VRSZ16txYXII+eSzjcpLLqbfrq/3C8ekBOLgy4p7Ihfyslv 0NrQ== X-Gm-Message-State: AOAM5328UGglRtcvEYzq1H+mMyCtczCGMJrgVSy5os5H3q76cMH2ICVj E0yb2ovgQgC0V6LNBhWdt+cT5w== X-Google-Smtp-Source: ABdhPJxIjtKJshdj00uAYNjGJ/vZ/LJ4kTMFy2Md31l7tYMpW1iId+EC+yEwM0P1TWU1YGqa6vJfgw== X-Received: by 2002:a65:6704:: with SMTP id u4mr2499719pgf.169.1619082384007; Thu, 22 Apr 2021 02:06:24 -0700 (PDT) Received: from C02DV8HUMD6R.bytedance.net ([139.177.225.240]) by smtp.gmail.com with ESMTPSA id x2sm1514348pfu.77.2021.04.22.02.06.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Apr 2021 02:06:23 -0700 (PDT) From: Abel Wu 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 Subject: [PATCH 3/3] docs/admin-guide/cgroup-v2: add cpuset.mems.migration Date: Thu, 22 Apr 2021 17:06:08 +0800 Message-Id: <20210422090608.7160-4-wuyun.abel@bytedance.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210422090608.7160-1-wuyun.abel@bytedance.com> References: <20210422090608.7160-1-wuyun.abel@bytedance.com> MIME-Version: 1.0 X-Stat-Signature: 7hmp3mxq5j1x9swezeo461pzotcxbo3r X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 64F7B2000242 Received-SPF: none (bytedance.com>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=mail-pf1-f173.google.com; client-ip=209.85.210.173 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619082371-728061 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add docs for new interface cpuset.mems.migration, most of which are stolen from cpuset(7) manpages. Signed-off-by: Abel Wu --- Documentation/admin-guide/cgroup-v2.rst | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admi= n-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. =20 + cpuset.mems.migration + A read-write single value file which exists on non-root + cpuset-enabled cgroups. + + Only the following migration modes are defined. + + =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D + "none" migration disabled [default] + "sync" move pages to cpuset nodes synchronously + "lazy" move pages to cpuset nodes on second touch + =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D + + 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. + =20 Device controller ----------------- --=20 2.31.1