Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2927208imm; Thu, 24 May 2018 19:12:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr0qlHwmo+a0QhXM9TjmIyOOupdJv+Y3qfLIm9qv5d22v5WK0MtyRl3HzJ8nyD8gkqOwIb5 X-Received: by 2002:a63:ae0d:: with SMTP id q13-v6mr381027pgf.199.1527214364308; Thu, 24 May 2018 19:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527214364; cv=none; d=google.com; s=arc-20160816; b=UmuHM7pKGfe+wnjlJ/yqW/b6BOywB3wR+GqwtrF1eaaD9KZOp+DJLMsi+0IemIy3Pb m3+Wi4DiwCiFOgJbpaYbawrKcBtwJm411L8lJzUwKyAHgcRlR+NSCtSz+75Z7UTbODS9 8Wj2YDt2bEFj06afkq87y8FIrMpNVOWjJhVFrKuTbqx5d+js+cGQz4xTDIe+d75NMswa LQf++SjFaE64FCLE8sW9Y5Zu1JlmHMKO5XsRzMgqzQMWlfVUrjGtJv38/enpUhnZIqx5 GxpU5BwT4XmaKU8C7SckLDVe4Fk3S8Tl6VOdq/VycZ24BXzMQPpFLyRAewWPFyiW61bc xRWw== 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=IItUpvtsthIeeHOULK4ul0pCR18QTGGFSuZU81iIBwg=; b=NNWq1JM5iyJp/goV64hqEZ4kJKpUi7RQtWNvwvClFWXVMeM8fmr4B2adANpA5lIr/q yVhdSvvRSk1BDkcECiN75rSFqOT1R2ieQn03q4QOdgZWwfSpg3DbpagXxxncnv4uUWf0 LvGY9P3cASQbecOlQf4NMZZx76amYuuIqunC3eQfO4R1oki/JQks86woric59JQfjmHg 7djJyiEQ0rfrJGf7MrIpL/VLNGAsEjFbdYWyWALrpTJUEWkQfhsL+4WPnpnEILAfBiW2 2pIMuISj7dni6Lj7LF0OIdY4gmfV07MrMe7Y5RKP5NhYPAV/8J9SdnSK7+4WIcIdDJE8 Mbgw== 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 p1-v6si21981696pld.218.2018.05.24.19.12.30; Thu, 24 May 2018 19:12:44 -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 S1033352AbeEXOgW (ORCPT + 99 others); Thu, 24 May 2018 10:36:22 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34795 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935698AbeEXOgS (ORCPT ); Thu, 24 May 2018 10:36:18 -0400 Received: by mail-wr0-f195.google.com with SMTP id j1-v6so3580153wrm.1 for ; Thu, 24 May 2018 07:36:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IItUpvtsthIeeHOULK4ul0pCR18QTGGFSuZU81iIBwg=; b=fdOhaknrG6sP6bxAJ7yxLzvt2qUslbJZJMcbN9o5cO9lceZ+uLBzMkhsOnUasDWwDh 4C0qdrfOcdP4WUV0MxteqeiR5kboM4yJYCwv+7H7pK/I4GwnVn7cM9utpNakJONfLm9Y sxQ9swtbaKu+n8qDqzzcdz5UlX5ywLXo/hkcouJwRjz+/CRaEK9O2/YsbuSFt1sUDBeJ ffGabf8ibeJgrUa3wH6kX3UoC9PLSMDI8Rux03rM8ue/iLNBYqnUHxhscSKw+qIE9lTx BiRyUu/t1WUE9oWqUXzc6c154HfUSAVs31rnXUkkJQahZU1acVjJKXbeljIX4PoxdmIA GDPA== X-Gm-Message-State: ALKqPwdpDmaoAaP1kOTvXOLoMz4baJfb5LzVhWg55grvWxaXGrSAWN1L LyGvlEzCkS7H5x2g/DYjJbnHGw== X-Received: by 2002:adf:c709:: with SMTP id k9-v6mr7093817wrg.65.1527172577622; Thu, 24 May 2018 07:36:17 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.242]) by smtp.gmail.com with ESMTPSA id o9-v6sm23658585wrn.74.2018.05.24.07.36.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 May 2018 07:36:16 -0700 (PDT) Date: Thu, 24 May 2018 16:36:14 +0200 From: Juri Lelli To: Waiman Long Cc: 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: <20180524143614.GC3948@localhost.localdomain> 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.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Right?