Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4362547imm; Mon, 15 Oct 2018 13:31:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV61DltGAcZ8lU8EeoDXuj0WpHpWvsudekeZb5Ktzt9qX55UhnYJNOiPYiS1hzNfAOux88Q6N X-Received: by 2002:a63:b4b:: with SMTP id a11-v6mr16508422pgl.97.1539635498975; Mon, 15 Oct 2018 13:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539635498; cv=none; d=google.com; s=arc-20160816; b=abMr0BBVVnT4zjmiC1ok13CvTcSryhP8AZy46EqKuHa3UjhRqE+nz6YThOFc0y8ThL d3Vi59uTJtMYnhadQ8BU/xdnSL8Mv0BQdWtp9WTfcoqN/NupUL9YlWzTSMwb+DJbvscW ZNrISkvZbuQFuvo/q4NW47P99FZX9r3kCkosfsEHRdYkINhYGElSjRQcU1JzrPYrXXTO rQkRnl1rLdfoLbvV/UXLgSMj6W3CASEIph9NhtAtj110P1dJoonG5h3gf52QbGS+6saD BB2RA230qdsF1KlTuSXlNImoaZ7W/owxPnSdcxXSETBgQQRlSg/Hh3CBfUYG39I4Zhvx FW+g== 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=2R0PmD28bFdRhbJ+Y8yO0xpOwZlbZt+OIFU33wAncCk=; b=WOuWdWt11AB3L4hSVxcgXx/pEsU5gSKbUpeL6eggUX9wdBCZkI/WR76pRjQ55NjZ5/ RCDusRhcSrVw9c91nb+Z0F4KX5tdaAeg/AGHTR0qNI9TeJtNPAmHd+OJ2j3MEC0mBg3C CoQ33CwkjLGXJguUM5vOz6ULwqP1gizdqWuLECPMByJqTWubP4HrbqsJFIqxoQI2h0T8 vkTEulHXY03VDAAs8rpT00eT4p9ex8rfaSVz4xQoqec+IwDnG01PeyvsUSQWl32sEZmN xxFhYOMUEnNRUD7iVfbtc1GhhL5CNmo2OGoroT5O6wun34Eki/jDtC/4YKEqLH89Tf/x PJXw== 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 ca19-v6si12508248plb.278.2018.10.15.13.31.23; Mon, 15 Oct 2018 13:31:38 -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 S1727163AbeJPERg (ORCPT + 99 others); Tue, 16 Oct 2018 00:17:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48724 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727129AbeJPERf (ORCPT ); Tue, 16 Oct 2018 00:17:35 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 095B788E56; Mon, 15 Oct 2018 20:30:45 +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 60CBD768B2; Mon, 15 Oct 2018 20:30:43 +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 , Tom Hromatka , Waiman Long Subject: [PATCH v14 09/12] cpuset: Expose cpus.effective and mems.effective on cgroup v2 root Date: Mon, 15 Oct 2018 16:29:34 -0400 Message-Id: <1539635377-22335-10-git-send-email-longman@redhat.com> In-Reply-To: <1539635377-22335-1-git-send-email-longman@redhat.com> References: <1539635377-22335-1-git-send-email-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 15 Oct 2018 20:30:45 +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 0465c231e2fb..533e85cb851b 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 53dbd473bd7e..b9832e355e36 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2569,14 +2569,12 @@ static struct cftype dfl_files[] = { .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, }, { -- 2.18.0