Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2945770imm; Thu, 24 May 2018 19:38:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqcmOsE5iEys96u8jrbkrkyIHvA0DQVTexc+dE+td8tCkQeDVP4Exb1n46d1psti5uOYcCg X-Received: by 2002:a17:902:b409:: with SMTP id x9-v6mr625766plr.180.1527215884557; Thu, 24 May 2018 19:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215884; cv=none; d=google.com; s=arc-20160816; b=qFAz9Pj5rsgRE2qFwq+NIlfg4H55Hvos84l+ndSKXijl7OVJ4jOc4bs5dO/HKIrhJx pjhcw+5YCX7EvUz8YfoTYQf5lq9AZ98vBw3uxvKDOvv5RyUDjBJKE+LtrkG1WKuLw9VS ifHwVgikQ4diWHqbPSwkRBbTmj7zHtRVnzJko6wzuerPwD2RwOOqPEOJVhnYCSQ8coSb 5n+IWIAMAwYQOJE9w/UggvdqG17nvR1NfHX3B1eyVKgX14gSgWfWOY4FJRBHlub0Hk41 qVqeepw71lPPHKBJUoCyBa4Ga8yLRFml4+MuSKIXMoogY3GixZiGHe+nZ1klkcE+i8z1 LiEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=G8M2zJliiTouZdlPzF87x/APkmh2DbC6d33sLtISN10=; b=RE9PJDU7JvYz4eQQokeQMpfOTg8HYnpsPQ79rOf8euJ65WYpG5udnUEKt54gPR3z99 sNjmIhIVG2DTCaU8UTRHJfYHaOBW9LA+MYkw5nwRas+j0K3itJHT+BEHhrt+ySHEd0Bm Ewjcj3CVgJTyO92QrRzDWwnSBtv61/jijfcIuq04xQE9DLOAmBslvyCC6qHXkZqSEoUL sR11/YDVimUgBqCsShr6g980RZsiyk91ft0uGzeukCNt/dF1+581RdQEHivqbSNziksK ydwL41Qd569TrZ+YpXWvOphdhmHNYEXfiPwnaw/4F+MamzOA06/8p5Vm9OPMl7LE9pey u6dQ== 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 u89-v6si22766730pfa.234.2018.05.24.19.37.50; Thu, 24 May 2018 19:38:04 -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 S1033006AbeEXSza (ORCPT + 99 others); Thu, 24 May 2018 14:55:30 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032744AbeEXSz2 (ORCPT ); Thu, 24 May 2018 14:55:28 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 35AA64022407; Thu, 24 May 2018 18:55:28 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-81.bos.redhat.com [10.18.17.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5CD8E10FFE6C; Thu, 24 May 2018 18:55:25 +0000 (UTC) Subject: Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2 To: Peter Zijlstra 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 References: <1526590545-3350-1-git-send-email-longman@redhat.com> <1526590545-3350-4-git-send-email-longman@redhat.com> <20180524154341.GJ12198@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: <9f547771-54e8-118e-80f7-48f99c7b0a12@redhat.com> Date: Thu, 24 May 2018 14:55:25 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180524154341.GJ12198@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 24 May 2018 18:55:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 24 May 2018 18:55:28 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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 On 05/24/2018 11:43 AM, Peter Zijlstra wrote: > 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 ? The domain is for partitioning the CPUs only. It doesn't change the load balancing state. So the load_balance flag is still need to turn on and off load balancing. Cheers, Longman