From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.50.34 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796045912; b=bOQMvSNtcl8zZHCAyT1sKqdm10pdA0Pg12OyCeF5JJSAZSgJlpw6klgfOISDIyr+nkKo SYrnUYejVKOOqmjoO6aLjNIY1yQnG/9UTU0RneCEkT8Q9oZm2mPLVoc3TwfRnZkmlvrxy mTFUGoW5z1HZEm0O4iwWKXkT/hD2qZJIsVtqEEz8vP5TDVe2vEZ4yGmAqbrLvK2AMNZqf AySj+564uzKvfV7fKcDcTm4zfd+odRDzgCnTN5/mN1NFoOhsvW3xQa04ktWIGpfvAyOZg dBNeEBFl3EH5D8BbAmDhBcMxEStog3XAzGYZ7ju3HIAXe3BeAJkcLQepYspYwNoL1xw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045912; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=Cu6L036C4GeOK5Qri1TbEPnIbRYShU/Wk7xAnoCLxSE=; b=3ydr66nROhlnCL9Guc/C+1pe9ch7F33hjKaMASzWxKbnBC1vwTal/Cls1b5oT5sdQFuh sceH0wjivOcB7JX8luHZMGw34QUKTD3TLZOpCntvzEOLKQl/XIL3XL61OqRnwriFluHTq lGsonZ62zYHbTj/DDXIieurbdMWabo9PVk0sgcXdzODYzNtINJjtrIehCryE/2eWd1x0R HpGDRvevNmYYMBItVqumJCf1XOrkt3OhC07Hhy1tVzt3a5eKB/STvfZw2JpwkxZi6iQgk R0j0wsPJAOVpAJGsU7GR79XLp61lx8ulufDcU3xiw316XtbqqC5kgFMoW5gQTjQ0OEA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b="DA3nXjo/"; arc=none smtp.remote-ip=90.155.50.34 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B304606A31C; Mon, 30 Nov 2026 13:38:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2B304606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=DA3nXjo/ 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=Cu6L036C4GeOK5Qri1TbEPnIbRYShU/Wk7xAnoCLxSE=; b=DA3nXjo/9igx1JXydxJCOYl909 veybckTMM0oTXRCdLtyC6CuPC74QQZvJ055Gz4JNB5lsQOLT0uRzi52o4MJ0U/xZTXhafLs++CUqM AAvHTFHAihxtg+rOF1Z6RYdJ3DHDaS7lV9LfeI6vODnCW35JWTyYDNp4INQ+q6wp+X1ezod5R4AyI 7FoibbgTjKT+prb3U11pmjhQgtRllMN6AqKgWrf4JD7BPsa3T7i7kg+og3OBAVgX7oVjyvuidM9hS Y8mwz+M4VV6wAWZyKsI8RysCTJtJlCdslb/OilFgxIKFXWBkKiJdSDh7p1tx45t1apFqWcqQmVJoV uC5iaVKA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY1aK-0000000EPeb-0PdZ; Mon, 30 Nov 2026 13:38:24 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id E2D733011E4; Mon, 30 Nov 2026 14:38:22 +0100 (CET) Date: Mon, 30 Nov 2026 14:38:22 +0100 From: Peter Zijlstra To: Tejun Heo Cc: Juri Lelli , luca abeni , Yuri Andriaccio , bsegall@google.com, cgroups@vger.kernel.org, dietmar.eggemann@arm.com, hannes@cmpxchg.org, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@redhat.com, mkoutny@suse.com, rostedt@goodmis.org, vincent.guittot@linaro.org, vschneid@redhat.com, yuri.andriaccio@santannapisa.it Subject: Re: [RFC PATCH v7 00/29] Hierarchical Constant Bandwidth Server Message-ID: <20261130133822.GE2668564@noisy.programming.kicks-ass.net> References: <471bf8d446becabfca00041fb2a78067@kernel.org> <20261120120659.2e902463@linux.fritz.box> <6fef47e08a37079c08806b3c57994778@kernel.org> <20261120212418.10221f2e@linux.fritz.box> <06f4c157677f99fc5386dba4c9d68cd2@kernel.org> <20261123084345.4e24e3ca@luca64> <20261127114828.GS49833@noisy.programming.kicks-ass.net> <4f3afbc84c522f9477d62a35ad01d5a5@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f3afbc84c522f9477d62a35ad01d5a5@kernel.org> On Fri, Nov 27, 2026 at 09:22:27PM -1000, Tejun Heo wrote: > Hello, Juri. > > On Fri, Nov 27, 2026 at 03:35:54PM +0100, Juri Lelli wrote: > ... > > Either the entry's bandwidth > > stays claimed while its CPU is unreachable, so cpuset changes never > > fail but that bandwidth sits unused, or it's released and claimed again > > when the CPU becomes reachable, which means growing a cpuset can fail > > because of the cpu controller. Tejun, Peter, does either work for both > > of you? > > My preference is the former. I'd like to avoid intertwining the two > controllers as much as possible, so an entry would keep its bandwidth > claimed whatever cpuset says and a cpuset change wouldn't fail because > of cpu.rt.max. I don't see how we can avoid failing extending the cpumask. At all times the bandwidth allocated must be less or equal to 1. If we have 4 CPUs, and 2 disjoint cpusets: A, B; then both A and B can claim up to full bandwidth for each of their CPUs. The moment we want to extend the cpumask of either group to overlap with the other, we must guarantee the bandwidth allocation remains valid. Example; let A have cpus 0,1 and B 2,3. Have them all have 0.8 bandwidth for all CPUs. Then if we try and extend A to include CPU 2, that CPU would end up with 1.6, which is not valid and must therefore be rejected. It is very simple, extending the cpumask adds bandwidth demand (the new CPU(s) will need start their server for this cgroup), if this bandwidth is not available, it cannot happen.