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 C5F47310763 for ; Wed, 21 Jan 2026 16:17:02 +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=1769012227; cv=none; b=cFKsV1Md5OQKZksCWEMAQ6zEf6lx6fhfhLZ1m+lPM0m3fBPaky+m4cGPjU7z95YWwF01DxpSOXwNhwPWEv8d0lEW1P7BPDP6Ys2/dpZpe2pTCOKfewwd3Olehwtjm2mvNZRhCYeziG8AO5pK0XGiJmkA9IT71YmEKGlEv24OqaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769012227; c=relaxed/simple; bh=HpZ7g2hMNqyODD/uyNWQzNZ15qwiDQDS31g5Z4z8CXk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=brUPqNzMPXwX46g54HFRFtau/6KrW+y6OkBH1ae1z5k/Xcmg4vYVhsloLTSISDtTbkA05fZoDwqxgp/oO9CQB/2R3kUBTGsWK7YW5QNp8Ku2FbynuQYVFAadsJNY8jI8LwkN6b520LTEUNCh5dVBISXd/73k2BaVa8/SLFYp8Bs= 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=wY85qmF6; 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="wY85qmF6" 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=fS4xPEJX73+Us+p17gZVUlem3hBPUCqDMObeN/oXTsE=; b=wY85qmF6pEM14va0XUqd/9553I vUzV2LyahTMxZFsw3GgGAkCcYQXQUauhiIzpfcz0xTGLmUxxPTSQXkRGGuLx/oBE7EnI5Qygp+JkJ Tzhk6w1A2CI2MFKrpeqekRmtkp/bWsva68x2L8FBGETkzkLG9wZ7W/36lqN40KIA4QaU2zV+zfVoB ZeHVU4IEU/GTTNIWTEGWdaZXPnqfuWocj6SpNonHXaNiePTuxzqyHSVLsx9QIXGzVbrK7wrvFDIz3 4XtdEeXjd4mVIwuwTD6+SOuCNpDiDnjHu8Xq0RFGyB9saJh/XhD8twfLhPxicIld0J+rKgXhmBJTb PI9njaLw==; 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.98.2 #2 (Red Hat Linux)) id 1viat4-0000000GaCm-1mo1; Wed, 21 Jan 2026 16:16:54 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id ED1C7300329; Wed, 21 Jan 2026 17:16:53 +0100 (CET) Date: Wed, 21 Jan 2026 17:16:53 +0100 From: Peter Zijlstra To: K Prateek Nayak Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , linux-kernel@vger.kernel.org, Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Chen Yu , Shrikanth Hegde , "Gautham R. Shenoy" Subject: Re: [PATCH v3 0/8] sched/topology: Optimize sd->shared allocation Message-ID: <20260121161653.GH166857@noisy.programming.kicks-ass.net> References: <20260120113246.27987-1-kprateek.nayak@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: <20260120113246.27987-1-kprateek.nayak@amd.com> On Tue, Jan 20, 2026 at 11:32:38AM +0000, K Prateek Nayak wrote: > "sd->shared" is only allocated for the topmost SD_SHARE_LLC domain and > the topology layer uses the sched domain degeneration path to pass the > reference to the final "sd_llc" domain. I'm fairly sure we've had patches that introduced it for other levels at various times, but clearly none of those ever made it. Anyway, a quick peek seems to suggest it is still easy to extend. > include/linux/sched/topology.h | 1 - > kernel/sched/fair.c | 62 +++++++----------- > kernel/sched/sched.h | 2 +- > kernel/sched/topology.c | 111 ++++++++++++++++++++++----------- > 4 files changed, 101 insertions(+), 75 deletions(-) Is this really worth the extra lines though?