From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C3D7349B18 for ; Thu, 19 Feb 2026 15:49:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771516151; cv=none; b=SM++VHTgmqMFsqvG82c+5AZEu/NZPzdswtgW/MPsnadnyQdiXdqgMCEVH73YFoM5Kwq2hgERJfbunV87LYYzNVCCu8stlQ4sNkgW0sTljT7aysUajRrPtui2XaRrrzDEo3M4fq+PQyI2tSS6C6otXvvKNG//8WMkR/nMdEZw5pU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771516151; c=relaxed/simple; bh=xfSwgwsOy4wsrc3JoHDwnKVl/LFs57Y6xV4D1BrIxgc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pJNWd5rxXNAYczDfff/TIHCh4TJdLYAv0iDwpfN214jL1sVXU5htXvKZW4zoAp+BaGiac6DVh9AWNIsUHGb4++yFJtHPYwXwHSgHza22T7P2BBBuVdFXSHHq0neidaVikgHR4nTA2IgbCpwwmvKVhuw4hlpWGpSpy6HjbF1LF1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=DgoahlCB; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="DgoahlCB" 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=6YaWXk96z7ofFHuLuW8/OtSUHlaVCj6fqoumhwTqhK0=; b=DgoahlCBVtpLreLQItnI6JniKu hkNYn/MA7NV84fNvu2mqas0z++LCprgCjvwNm4GTWoZ3MlK2gk95ba2h6/uFnc4lnBROjaRrsjNkn MHsXhJekMbpUekg90HugDv9vx0BJHP7lOfF2fdAysXB9Cd0479IlhCohjalhaVSj1300+6NksVDzM yaOdwZVBJP7z3fJUzwfHQ+RU9rcjz1iyU0WldmlVQlSlnYypCC/oSH25gLzFdHXD2bWpm0lKF2KR+ 9c889L4IXG0WlTGSscFv+g+od/7HdI/8kTo9HTa2kUIYtq7xq/b33cYOJbAcViJ/UrEb/IlPvfe7M UcuFiHPA==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vt6GU-00000007pDR-0kVc; Thu, 19 Feb 2026 15:48:30 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 1614B300B40; Thu, 19 Feb 2026 16:48:29 +0100 (CET) Date: Thu, 19 Feb 2026 16:48:29 +0100 From: Peter Zijlstra To: K Prateek Nayak Cc: "Chen, Yu C" , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Madadi Vineeth Reddy , Hillf Danton , Shrikanth Hegde , Jianyong Wu , Yangyu Chen , Tingyin Duan , Vern Hao , Vern Hao , Len Brown , Aubrey Li , Zhao Liu , Chen Yu , Adam Li , Aaron Lu , Tim Chen , Josh Don , Gavin Guo , Qais Yousef , Libo Chen , linux-kernel@vger.kernel.org, Tim Chen , "Gautham R . Shenoy" , Vincent Guittot , Ingo Molnar Subject: Re: [PATCH v3 04/21] sched/cache: Make LLC id continuous Message-ID: <20260219154829.GJ1395266@noisy.programming.kicks-ass.net> References: <60a05a3f50d14a7bf3b968f62cca87893c5c552c.1770760558.git.tim.c.chen@linux.intel.com> <79755f7d-cc68-4189-b6d8-850378e54017@amd.com> <95923e36-4117-4209-97aa-a92b60f2bd49@intel.com> <6a73ac0d-1fc9-49a7-87a2-65951ab2c844@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a73ac0d-1fc9-49a7-87a2-65951ab2c844@amd.com> On Tue, Feb 17, 2026 at 01:39:45PM +0530, K Prateek Nayak wrote: > I'm not sure if this is technically possible but assume following > topology: > > [ LLC: 8-15 ] > [ SMT: 8,9 ][ SMT: 10,11 ] ... [ SMT: 14,15 ] > > and the following series of events: > > o All CPUs in LLC are offline to begin with (maxcpus = 1 like scenario). > > o CPUs 10-15 are onlined first. > > o CPU8 is put in a separate root partition and brought online. > (XXX: I'm not 100% sure if this is possible in this order) > > o build_sched_domains() will bail out at SMT domain since the cpumap > is covered by tl->mask() and tl_llc = tl_smt. > > o llc_id calculation uses the tl_smt->mask() which will not contain > CPUs 10-15 and CPU8 will get a unique LLC id even though there are > other online CPUs in the LLC with a different llc_id (!!!) Yeah, so partitions (including isol_cpus) could wreck things here, since this is purely about the sched_domains. You can create N single CPU partitions (isol_cpus does this) and end up with the same 'problem' that online one at a time loop did. Except this time it would not be 'wrong'. Since they are single CPU domains, you also don't get load-balancing, so who cares I suppose. But it will inflate max_lid. But suppose you create N/2 partitions (where N is the number of CPUs in the physical LLC), then you get many individual 'LLC's and load-balancing inside them. I suppose this is correct, although it does inflate max_lid somewhat beyond what you would normally expect. However, most of that space would be wasted, since you're not actually allowed to migrate to them.