Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3738840imm; Thu, 17 May 2018 13:56:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKvrw3omT2S6948RbPgxNBfw0wi5Rcz+7QaLi5ubv4wVLQnNxN/dLKf2fZCmpfjbSS0YwQ X-Received: by 2002:a17:902:bcc4:: with SMTP id o4-v6mr6494928pls.308.1526590606719; Thu, 17 May 2018 13:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526590606; cv=none; d=google.com; s=arc-20160816; b=ANwOs1RFyu4stm/sXUf6Wfrwv2CeHm0lAieaA1azQbp2nlbSKjYsDXAxFSqB896Zt/ VHTC4ytUgx+24jSIjW4u+IrESPlNdtwDIKbbHkE07xghjBlmUVGEdTwmHbYjqinvl4// yoK9kZOXdKMSBEa0/Fo7gEYwAi3NLTNo7C0BkuFINvo5a8FKPEYOa1aC3J3kQ0W40a8q P3oFKazcdZ/shv0DzmjBMrPcvfGRqN6RPyxkVDg8cFuFkU7OioqgU840JEE+uwe9n0l5 zqHiY7ihULnAUYW9EZsOxNkSdjQ0GLut+YRMH9fa1RKt04qeHuU5Rx+WpfmHOuCwZrKb vTNQ== 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:arc-authentication-results; bh=LYSH44xtprkSiq6yUoRjYNz7laVsW655liYqqx5fYdg=; b=bA2+RlGgshG15HkIVr6QGvOU5JRksrfLd2Ifz/eJDEVBquSft50T8yvRcmsRNSd7B/ SPnLCW9CZ69vy4BCDCGT9yufGjCJVsfcq5McqXTk4WwMwmzSDwlbdORR2twDEnnFRep9 qQFFFXZHG8MDeNK1MEKeK7GQkSzC3+0LVpiRNgIbGQq4MBDqdg6UOTadCAU0qMd9yLdl APgPzVpsFwQBfralINjhX0GTh7H6oYpqTF0thMSiEKOeZ804SCfhRmQjZixUUdMGwrla MDWNLbSrLz9lKe80MU/Wkc2iImiV3HBdGiiC/PvQunFCjCos9AH9k/cCoxlX2AclYx/U 1qkg== 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 o6-v6si5502933pls.234.2018.05.17.13.56.32; Thu, 17 May 2018 13:56:46 -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 S1752385AbeEQU4V (ORCPT + 99 others); Thu, 17 May 2018 16:56:21 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37198 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752174AbeEQUz7 (ORCPT ); Thu, 17 May 2018 16:55:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A1CC402310A; Thu, 17 May 2018 20:55:58 +0000 (UTC) Received: from llong.com (dhcp-17-164.bos.redhat.com [10.18.17.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id 086AD2024CBD; Thu, 17 May 2018 20:55:58 +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 , Waiman Long Subject: [PATCH v8 5/6] cpuset: Expose cpus.effective and mems.effective on cgroup v2 root Date: Thu, 17 May 2018 16:55:44 -0400 Message-Id: <1526590545-3350-6-git-send-email-longman@redhat.com> In-Reply-To: <1526590545-3350-1-git-send-email-longman@redhat.com> References: <1526590545-3350-1-git-send-email-longman@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 17 May 2018 20:55:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 17 May 2018 20:55:58 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'longman@redhat.com' RCPT:'' 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.domain" 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/cgroup-v2.txt | 4 ++-- kernel/cgroup/cpuset.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt index 071b634d..8739b10 100644 --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt @@ -1474,7 +1474,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 allowed to be @@ -1504,7 +1504,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 allowed to diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 0e75f83..fb8aa82b 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2203,14 +2203,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