From: Peter Zijlstra Subject: Re: [PATCH 2/5] cgroup/cpuset: Add new cpus.partition type with no load balancing Date: Thu, 10 Jun 2021 21:39:35 +0200 Message-ID: References: <20210603212416.25934-1-longman@redhat.com> <20210603212416.25934-3-longman@redhat.com> <820aff72-fce2-ac2f-88e6-787249e04308@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=dFVbMgHSVXeqKN6P1dJ+5aGTI7wSx+DxBg16yiPD+NU=; b=jLWPqrtTHgNShn8IpLGkd6FVZ3 izj6LMj2aFyZzsEkle6f5RA+iQCJVb9B2PjXWPNQtwI7lOQfDhA07umz1wQEi89AcaF/T3JA5MdQP U3PE/a9COCNVIXjSrn6TYJgtyiBpWeJVmsgb0/O83RY1Lwybg5rDDktCwQI0h4MwYYS2N18/wc3Lf i7qeN9Mfj4Ux1UzKetZKr2BUtH1JMEiJqcWxv0/E1OhXjMVlpZXEphZ/8r9LGCLa6xboy6Jq0ABya eG/+sh4cdiXw55XeyETHRsXU/l6jlFvf2G6lBGetSMirYQJI1sTMe1W6EWeguc9qbkJNm8jNA0+iN OOYGIErQ==; Content-Disposition: inline In-Reply-To: <820aff72-fce2-ac2f-88e6-787249e04308@redhat.com> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Waiman Long Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Roman Gushchin , Phil Auld , Juri Lelli On Thu, Jun 10, 2021 at 03:16:29PM -0400, Waiman Long wrote: > On 6/10/21 2:50 PM, Peter Zijlstra wrote: > > On Thu, Jun 03, 2021 at 05:24:13PM -0400, Waiman Long wrote: > > > Cpuset v1 uses the sched_load_balance control file to determine if load > > > balancing should be enabled. Cpuset v2 gets rid of sched_load_balance > > > as its use may require disabling load balancing at cgroup root. > > > > > > For workloads that require very low latency like DPDK, the latency > > > jitters caused by periodic load balancing may exceed the desired > > > latency limit. > > > > > > When cpuset v2 is in use, the only way to avoid this latency cost is to > > > use the "isolcpus=" kernel boot option to isolate a set of CPUs. After > > > the kernel boot, however, there is no way to add or remove CPUs from > > > this isolated set. For workloads that are more dynamic in nature, that > > > means users have to provision enough CPUs for the worst case situation > > > resulting in excess idle CPUs. > > > > > > To address this issue for cpuset v2, a new cpuset.cpus.partition type > > > "root-nolb" is added which allows the creation of a cpuset partition with > > > no load balancing. This will allow system administrators to dynamically > > > adjust the size of the no load balancing partition to the current need > > > of the workload without rebooting the system. > > I'm confused, why do you need this? Just create a parition for each cpu. > > > From a management point of view, it is more cumbersome to do one cpu per > partition. I have suggested this idea of 1 cpu per partition to the > container developers, but they don't seem to like it. Oh, because it then creates a cgroup tree per CPU and you get to move tasks between cgroups? OK I suppose.