Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2935065imm; Thu, 24 May 2018 19:23:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpMx3HCY+pwnWB3KsEcZmHKa9QqopQSJO2JgeWyf5WsuVUd4PD+BWLVYxA/w+20LZc4eM9j X-Received: by 2002:a62:8b0a:: with SMTP id j10-v6mr565477pfe.28.1527215000989; Thu, 24 May 2018 19:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215000; cv=none; d=google.com; s=arc-20160816; b=E3rGp8NqYMq2YMcatM0bj++ZiDQput55aofqnfHq1nYcCc7oIblT4CnihYV6XctIm4 WMsvNQSXiaAe/BOOCuqsWqFTjlXA2NGvREfhENWlLo/cSxfLVAsALkfjw/YE9SHyZj2O 4mAkBCHp9hCK/C+5T91HCqc8tTmDDOhZ7OJEPH/nnyARR0A+MG/ockv/HzEHQjRy6Pk/ XC0iwXsiTXV76A4yVr9okOI/xjQ+09b63neZE5Iw5Cu5uAAbYovSwa0inUcV9tIPNFzR PSvgsfifvfNhEo2HmG7vktUZXgf2U7JGmZbmeI700YM/rnCkw9f/Jjyf+hrMP/PCvsD5 eYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=pBHJEC6rCvWa/ECQO/49DsKWJe35kRl+AcunCcpTkSo=; b=k71LiDFfjsOiS8iZtsLRHqr5uyYbGGAG7pDoLrImSueYritkdRXVNCr3DZzGi59m+o PfxS+r9OQThSlOfEs/nY8UVdo2cSxvbzaM6j/AuAjS0WdKEDmkEeEf9ptjupq1LXl/1A l9SQEu7qTM92cO1qLCsUap84hRyjVGvByIaJYXB1xF6tbIv1qDS8XRN59wUpP2Kv4/Jc Da3t2iqZVzxnS+XrADD1e6TCppTcCsgWc0J5yJbmvuLuj9RZZ/PkEftfPW+XiZVG67Va AAkgNjhwGQmjaeddITidRZfd02vbvH6E8mKHSCOotTx3M0VQsyAA6Gp7hkeJ1F3PqKrh 2slw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=E0al/HiV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3-v6si22235743pld.96.2018.05.24.19.23.06; Thu, 24 May 2018 19:23:20 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=E0al/HiV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968070AbeEXPoB (ORCPT + 99 others); Thu, 24 May 2018 11:44:01 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49022 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967710AbeEXPnz (ORCPT ); Thu, 24 May 2018 11:43:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pBHJEC6rCvWa/ECQO/49DsKWJe35kRl+AcunCcpTkSo=; b=E0al/HiVlN6p7AhoCRcGvoUDf z0SHCsDW72wsgOjGjMjhCx9l+mIAs2xioQVDyel8wFXRF/AUILkwLSRhK3RxKsaqnnhWnYHRrrp7O ZvuAu9UzfmFJPMySBbPmpv0+n5yncqiZiMh4pcnzNH/swiAyTWGc46+m7tU85GLkq8Dlj/YA4xNRD BioyQy/JybOw9jogtZa/cRrZjRAbEssqPC3CTcod5FauldtBTfViuVN3yq+ubf+AWX2kq2ktLezob Yt/jalSdpkKJ8srLYbDMmb7X9PlicC6MwRqQ59HRbuSInI8glfvACanNhiT3dFRkKnu/PQYUWHe61 PAv2vKFUw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLsP0-0001Xa-TM; Thu, 24 May 2018 15:43:43 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 83DD72029F1C3; Thu, 24 May 2018 17:43:41 +0200 (CEST) Date: Thu, 24 May 2018 17:43:41 +0200 From: Peter Zijlstra To: Waiman Long Cc: Tejun Heo , Li Zefan , Johannes Weiner , Ingo Molnar , 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 Subject: Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2 Message-ID: <20180524154341.GJ12198@hirez.programming.kicks-ass.net> References: <1526590545-3350-1-git-send-email-longman@redhat.com> <1526590545-3350-4-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526590545-3350-4-git-send-email-longman@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 04:55:42PM -0400, Waiman Long wrote: > The sched.load_balance flag is needed to enable CPU isolation similar to > what can be done with the "isolcpus" kernel boot parameter. Its value > can only be changed in a scheduling domain with no child cpusets. On > a non-scheduling domain cpuset, the value of sched.load_balance is > inherited from its parent. > > This flag is set by the parent and is not delegatable. > > Signed-off-by: Waiman Long > --- > Documentation/cgroup-v2.txt | 24 ++++++++++++++++++++ > kernel/cgroup/cpuset.c | 53 +++++++++++++++++++++++++++++++++++++++++---- > 2 files changed, 73 insertions(+), 4 deletions(-) > > diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt > index 54d9e22..071b634d 100644 > --- a/Documentation/cgroup-v2.txt > +++ b/Documentation/cgroup-v2.txt > @@ -1536,6 +1536,30 @@ Cpuset Interface Files > CPUs of the parent cgroup. Once it is set, this flag cannot be > cleared if there are any child cgroups with cpuset enabled. > > + A parent cgroup cannot distribute all its CPUs to child > + scheduling domain cgroups unless its load balancing flag is > + turned off. > + > + cpuset.sched.load_balance > + A read-write single value file which exists on non-root > + cpuset-enabled cgroups. It is a binary value flag that accepts > + either "0" (off) or a non-zero value (on). This flag is set > + by the parent and is not delegatable. > + > + When it is on, tasks within this cpuset will be load-balanced > + by the kernel scheduler. Tasks will be moved from CPUs with > + high load to other CPUs within the same cpuset with less load > + periodically. > + > + When it is off, there will be no load balancing among CPUs on > + this cgroup. Tasks will stay in the CPUs they are running on > + and will not be moved to other CPUs. > + > + The initial value of this flag is "1". This flag is then > + inherited by child cgroups with cpuset enabled. Its state > + can only be changed on a scheduling domain cgroup with no > + cpuset-enabled children. I'm confused... why exactly do we have both domain and load_balance ?