Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1054291imm; Fri, 12 Oct 2018 10:57:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV60AI3tEP9jddq70vej1QOyoXBhh5HPeeM/sXEaiSGrDLvZ5WrGVGsncOsFPMvLwlncz96Pe X-Received: by 2002:a63:1411:: with SMTP id u17-v6mr6296464pgl.247.1539367076239; Fri, 12 Oct 2018 10:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539367076; cv=none; d=google.com; s=arc-20160816; b=NUJqswd5c1XjR3DrKmgQKmYUAgOr5WeE5o4XS0BjZFM3SYQZtBs9/jbgOD2fUyrugi q4Cr3b82bmlFTP1uHKlJcWEbfFBIQdAO7g4T2eWmlekr1Dq++3GU1h8P9wgDtEN7Dtq/ EskYS5fetA1zgkiYSZr2x4FJUgF7KSIRh6BtU3xypdUahY0yE7cPrG6w04wGvGfn2ak0 LALhg9tH2k2UKgVZQNATJ7VjQLJy7db31ZC4X0KS0WbUMlcKlrwytKxZHm3+kxcSEudW 1iL8K5FABDwFRVn8lwF+qk4GLw2ceBSPa8x2ZYNGInHFoyXnjpe5ma4n3EcBmgzhsph7 gn4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=faBPQrJcwLj2EyTFEMGMdDaEQF6oMkO0z9F9/m6QLGM=; b=mfjeBmmvIC3lkNRrTIA4UsKZa5mHXvpMWjKiUUZEX8p07O68PzxT56tj1fREVH1pBR s5CSM0z58Gh5X1se4KbYl3kDiuuBUuI6CIIpaZeO51xki6nvE/aGdkiazcHOj/glK7GS HQOzrMlD7GeOPS18UxbWhLgybtepb/7jmTqHFsACm+iWqHHYz3SyAAUi1cN9zJNqw/ul q9posLtKpmH6AlHJEpTD15l5HjOuqZ8KXwsDxSHznBjuBm3faOOLTXsNnmFCbTM2INbs 6coj+oyc6bY7vVeqpfSwkVRti3nob0OF8oCmCS5bfdvtmnkowbDHimsMqUiR1mbcf1yA lYJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t62-v6si2016008pfj.53.2018.10.12.10.57.41; Fri, 12 Oct 2018 10:57:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727483AbeJMBaV (ORCPT + 99 others); Fri, 12 Oct 2018 21:30:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46090 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbeJMBaT (ORCPT ); Fri, 12 Oct 2018 21:30:19 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0827D3001389; Fri, 12 Oct 2018 17:56:41 +0000 (UTC) Received: from llong.com (dhcp-17-8.bos.redhat.com [10.18.17.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DF5579453; Fri, 12 Oct 2018 17:56:39 +0000 (UTC) From: Waiman Long To: Tejun Heo , Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, Mike Galbraith , torvalds@linux-foundation.org, Roman Gushchin , Juri Lelli , Patrick Bellasi , Waiman Long Subject: [PATCH v13 09/11] cpuset: Expose cpus.effective and mems.effective on cgroup v2 root Date: Fri, 12 Oct 2018 13:55:49 -0400 Message-Id: <1539366951-8498-10-git-send-email-longman@redhat.com> In-Reply-To: <1539366951-8498-1-git-send-email-longman@redhat.com> References: <1539366951-8498-1-git-send-email-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 12 Oct 2018 17:56:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because of the fact that setting the "cpuset.sched.partition" in a direct child of root can remove CPUs from the root's effective CPU list, it makes sense to know what CPUs are left in the root cgroup for scheduling purpose. So the "cpuset.cpus.effective" control file is now exposed in the v2 cgroup root. For consistency, the "cpuset.mems.effective" control file is exposed as well. Signed-off-by: Waiman Long --- Documentation/admin-guide/cgroup-v2.rst | 4 ++-- kernel/cgroup/cpuset.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 0465c23..533e85c 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1631,7 +1631,7 @@ Cpuset Interface Files and won't be affected by any CPU hotplug events. cpuset.cpus.effective - A read-only multiple values file which exists on non-root + A read-only multiple values file which exists on all cpuset-enabled cgroups. It lists the onlined CPUs that are actually granted to this @@ -1671,7 +1671,7 @@ Cpuset Interface Files and won't be affected by any memory nodes hotplug events. cpuset.mems.effective - A read-only multiple values file which exists on non-root + A read-only multiple values file which exists on all cpuset-enabled cgroups. It lists the onlined memory nodes that are actually granted to diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index c52074e..a3b81d4 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2560,14 +2560,12 @@ static s64 cpuset_read_s64(struct cgroup_subsys_state *css, struct cftype *cft) .name = "cpus.effective", .seq_show = cpuset_common_seq_show, .private = FILE_EFFECTIVE_CPULIST, - .flags = CFTYPE_NOT_ON_ROOT, }, { .name = "mems.effective", .seq_show = cpuset_common_seq_show, .private = FILE_EFFECTIVE_MEMLIST, - .flags = CFTYPE_NOT_ON_ROOT, }, { -- 1.8.3.1