Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3265698imm; Fri, 25 May 2018 02:41:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo9Q+Oo5lNE4ZhyPNTEqeE8CIxuMF0nxzVO6xPK8TF2kieWqgbBOETCOSes2e08QhDSTQl3 X-Received: by 2002:a63:7b1e:: with SMTP id w30-v6mr1392740pgc.249.1527241285749; Fri, 25 May 2018 02:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527241285; cv=none; d=google.com; s=arc-20160816; b=XMc5JvqD1DbKhDmZA8KpZmiOTOVSOd7PZGvRrz+gWN3L56fKum8RacvdcLMWJXPR2f r5hwKb8Q5mOrW6fx7zR9lwWE5yuhZXXECyvpV6b7Y1iYgPkstS3/195DhrBS9cIWqseQ AC0vr8y+nnaHBt9rVzvmtxnNnFunNpXljq2vRptoe/UoSQMcin8YXNL9rmkTECesFL6I jCt76nvZ6hbAKIDCD12vBgrUIq9A2j8K4pRLjGsZbf6bzPRvXDwwfp7MJdEOK8sCmCc2 cuMgMX89vv5EWOVvwEgBzLfwwfyay8k4zhl/nkFB/supCL05RdRcbgz0O3y/QJZwQ6E8 KY9A== 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:arc-authentication-results; bh=zeujCWx9ZjeyB5kxwC75EfCP98KrTY/TUzDwicqp5jc=; b=iWm+mUZpJUIDdeNYheeeiAhdUNOAU30U639GbDRp9vD8UBr9NormnwE0jd6cHRAel9 DX8kRZINIt1n3LKbvQJ4AcBOT0KVmwCZ6T0HM3DDamMXSseV4AsoTp1l3JAq37reTAqD sMp4o8Tj2BRyf4VNOmE3jMwCl78Kz0aiYgz+sklTAR8NsRTANNL0tja2VDCkt7JghinB IJV/VYCthO9Y2R463gFgizEW0Xow00ytRJ4cGQHIBTufHLpqnuJj0gBi7YUbk4G/Dk5I ED5e2QfBWpa8H6xoR2+v5jTOc7BDs1B1fALlzDSrjr1dX9gJ+gA0CER6ZiB/0D0OTZnb cKow== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26-v6si809324pgc.416.2018.05.25.02.41.10; Fri, 25 May 2018 02:41:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965370AbeEYJk5 (ORCPT + 99 others); Fri, 25 May 2018 05:40:57 -0400 Received: from foss.arm.com ([217.140.101.70]:57160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965197AbeEYJkz (ORCPT ); Fri, 25 May 2018 05:40:55 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6B6F580D; Fri, 25 May 2018 02:40:55 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A51183F25D; Fri, 25 May 2018 02:40:52 -0700 (PDT) Date: Fri, 25 May 2018 10:40:50 +0100 From: Patrick Bellasi To: Waiman Long Cc: Juri Lelli , Tejun Heo , Li Zefan , Johannes Weiner , Peter Zijlstra , 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 Subject: Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2 Message-ID: <20180525094050.GB30654@e110439-lin> References: <1526590545-3350-1-git-send-email-longman@redhat.com> <1526590545-3350-4-git-send-email-longman@redhat.com> <20180524143614.GC3948@localhost.localdomain> <4bd31510-4f73-e263-8dc1-5edb0fe63b59@redhat.com> <20180524151656.GD3948@localhost.localdomain> <5f409ed7-3850-f1ea-58cf-4326605d1570@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f409ed7-3850-f1ea-58cf-4326605d1570@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24-May 11:22, Waiman Long wrote: > On 05/24/2018 11:16 AM, Juri Lelli wrote: > > On 24/05/18 11:09, Waiman Long wrote: > >> On 05/24/2018 10:36 AM, Juri Lelli wrote: > >>> On 17/05/18 16:55, Waiman Long wrote: > >>> > >>> [...] > >>> > >>>> + 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. > >>> [...] > >>> > >>>> + /* > >>>> + * On default hierachy, a load balance flag change is only allowed > >>>> + * in a scheduling domain with no child cpuset. > >>>> + */ > >>>> + if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys) && balance_flag_changed && > >>>> + (!is_sched_domain(cs) || css_has_online_children(&cs->css))) { > >>>> + err = -EINVAL; > >>>> + goto out; > >>>> + } > >>> The rule is actually > >>> > >>> - no child cpuset > >>> - and it must be a scheduling domain I always a bit confused by the usage of "scheduling domain", which overlaps with the SD concept from the scheduler standpoint. AFAIU a cpuset sched domain is not granted to be turned into an actual scheduler SD, am I wrong? If that's the case, why not better disambiguate these two concept by calling the cpuset one a "cpus partition" or eventually "cpuset domain"? -- #include Patrick Bellasi