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 4FA0DC433B4 for ; Mon, 26 Apr 2021 07:01:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C558F610C8 for ; Mon, 26 Apr 2021 07:01:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C558F610C8 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 670806B006C; Mon, 26 Apr 2021 03:01:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61FAD8D0003; Mon, 26 Apr 2021 03:01:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 474A06B0070; Mon, 26 Apr 2021 03:01:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 27D026B006C for ; Mon, 26 Apr 2021 03:01:31 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DC1501801C439 for ; Mon, 26 Apr 2021 07:01:30 +0000 (UTC) X-FDA: 78073622340.14.3FABB2E Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by imf28.hostedemail.com (Postfix) with ESMTP id 377A0200038D for ; Mon, 26 Apr 2021 07:00:32 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id p17so528360pjz.3 for ; Mon, 26 Apr 2021 00:00:30 -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=0i9nIWEJj9GpgmwDenmDPUoRWsFexvOFaT+BUwCnkkTJB+KggV7EM95SvP/FIHknUT OJdeK9AduA5wcmvM8cbrNSN3YxfhLD0Ib9/gHGWwTDLfElVl2TVHo59+PlUjZXwWbKXn g34ffK1upYiGkve9TcgSCFheOQoFet00lvgYTSy76AS3IfROqU5uXI8ICbiFPg9jDG4g 2p9kPKgAc/HLRmNmSrHHyvu8BznKlDrqvvh0eyyB15I2bdRy0CmVsufO9jHXl3LVnQam RFh/sPCgsHU7lLUh91NE99fh0cdns99W4GJ+YvzguW4sWEQgMGtMyfqGqoIx0mE7zwqU Uo0g== 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=foGoMuIW5S0HKMU9w0wKZJjte3qq5QbN31oKrwySaU+/X9FZTWDLlhVH2IP8afTgCt S9wORs3fZBIu0W1Vvx4AaC/WvlbMrz7OHEvXRD+8liJWn7Mzck4bCNdihlfTyyt8Bg0X PhVGPC+cEtxSkJOxcdvC44zSSwT761XxiiEGZVtzeuQ3RBPRLl2+WD02Q262EC1yoQbB ExzmxVgtJ5+VJS/N+NX7AEvel7PTL0cW55H3R1I1pjdn0g7O5+qwEfCfPtyAQxV0gCGX vsipmbaQdQe/9pwNqAmZlHvNFPkkTiVNMxUqv8lp/vyzWToymjT+5IYtIgEMjsZHUM8f yBLQ== X-Gm-Message-State: AOAM5309MGwMoG6m6JEfaZniF5ZWWZEpuXE07IK49wIDLXOsDWSpBnsh qlsubF93hZgUd7ngfg3r1r+44w== X-Google-Smtp-Source: ABdhPJx+6i48QujB/q23eIBm0/+BBwJrzJlGWxuHq8FnVpASMhOEM1EnDigno4QWiwiJQGVCZ8Um2w== X-Received: by 2002:a17:90a:2e03:: with SMTP id q3mr15884562pjd.206.1619420429503; Mon, 26 Apr 2021 00:00:29 -0700 (PDT) Received: from C02DV8HUMD6R.bytedance.net ([139.177.225.224]) by smtp.gmail.com with ESMTPSA id w14sm4535047pfn.3.2021.04.26.00.00.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Apr 2021 00:00:29 -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, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Wu Subject: [PATCH 3/3] docs/admin-guide/cgroup-v2: add cpuset.mems.migration Date: Mon, 26 Apr 2021 14:59:46 +0800 Message-Id: <20210426065946.40491-4-wuyun.abel@bytedance.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210426065946.40491-1-wuyun.abel@bytedance.com> References: <20210426065946.40491-1-wuyun.abel@bytedance.com> MIME-Version: 1.0 X-Stat-Signature: p69fxbia1b7r84gqz66izuu8367pchok X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 377A0200038D Received-SPF: none (bytedance.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mail-pj1-f54.google.com; client-ip=209.85.216.54 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619420432-383905 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