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 5D01333688B for ; Tue, 19 May 2026 11:47:49 +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=1779191272; cv=none; b=guD3OtslxxwRZQNH3FguqvXOYm+k5PYvyWfjP1rbFW7QxJ0tbgDZGCo89ULOzLPr9IwYaTnPY+yLk36BzQ9AyH6CwCE+NrdMjPgfzIykFhseAgNUJ4doLt8XqpnLfApB7cQq7x89+VfdvgQfTF3GnuQjzHYYxQVjvvXqywu+adY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779191272; c=relaxed/simple; bh=cotzHG3K07ZZmJbjwhgtKcNkRSDHnBwlZ2QYCw5yiBs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ttYA93dJ+GeYRsm4JodQSnqkFKduVPAT7sUmO0xhXEL4KeL1LNmS3LAePIzH+VlYy0CrH5zYb0K9Fw76RWcp/Vw367ehoJ5Hpur75xDxbaHRj6i379j7bQdMDZwdkZpUBH7xmToFaXZuIaGLSbngodu26ZELRvSosHhY84ew9n4= 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=iL1mzrB7; 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="iL1mzrB7" 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=r2H4btnIBLUCOLUim3iuGrM8OUF0FZLfV8yKWph5pVU=; b=iL1mzrB7tLaIYIqI6c6leBeUkd AaMDm9WQQSuR9n/hUbsr/drJnlU2dXCB7HC/S2x+zp5oIta0HIDkvqBVp4Xyy7YHALpugFASTUtzq +UfrGGCtOMCUtGPfqKaYQnJOl7Z98jUyEmAEVPyEsd/XDUPNy0cf06c935r3xj6TCymvLg+DIsPF/ Tsx+8G53XxJ5vOBeEnX61Ay6ryj3dgGret7DE51G3BL0CM5OzVnUITXFifxPYexXUkWAq9MYr3Eiy 6lUazrwm7Kb8CW8GkysWqhJP8gS8fPzFhMQ7wQbuMXtsJMCyHCkJHutKpeRwOwecF72XlFUOXE8x5 /J9I2QEA==; Received: from 2001-1c00-8d85-4b00-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:4b00:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wPIvC-00000005rpI-2K9n; Tue, 19 May 2026 11:47:38 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id F1EFF3001D0; Tue, 19 May 2026 13:47:36 +0200 (CEST) Date: Tue, 19 May 2026 13:47:36 +0200 From: Peter Zijlstra To: K Prateek Nayak Cc: Andrea Righi , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Christian Loehle , Phil Auld , Koba Ko , Felix Abecassis , Balbir Singh , Joel Fernandes , Shrikanth Hegde , linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, yu.c.chen@intel.com Subject: Re: [PATCH v2 2/5] sched/fair: Attach sched_domain_shared to sd_asym_cpucapacity Message-ID: <20260519114736.GA3067227@noisy.programming.kicks-ass.net> References: <20260516055850.1345932-1-arighi@nvidia.com> <20260518205859.GY3126523@noisy.programming.kicks-ass.net> <81583f79-facf-473e-b756-31af724245bc@amd.com> <20260519084634.GA3126523@noisy.programming.kicks-ass.net> <0d7d6bb0-cdc4-433b-8810-bcba490aea60@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: <0d7d6bb0-cdc4-433b-8810-bcba490aea60@amd.com> On Tue, May 19, 2026 at 04:57:11PM +0530, K Prateek Nayak wrote: > Hello Peter, > > On 5/19/2026 2:16 PM, Peter Zijlstra wrote: > > Shrikanth noted I had an old version of his SMT ifdeffery patches on, so > > I need to rebuild that tree (and the merge) anyway. > > > > Do you want me to munge this in, or keep it on top as a fixie? > > Feel free to munge it but if you want to retain some context, here is the > full patch with suggestions from Andrea incorporated in: > > (Based on top of 5162728eecc2 ("Merge branch 'sched/cache'")) > > --- > From b0a8ad4b225820c2369f45242517c1c06bac1826 Mon Sep 17 00:00:00 2001 > From: K Prateek Nayak > Date: Tue, 19 May 2026 05:14:23 +0000 > Subject: [PATCH] sched/topology: Allow multiple domains to claim > sched_domain_shared > > Recent optimizations of sd->shared assignment moved to allocating a > single instance of per-CPU sched_domain_shared objects per s_data. > > Recent optimizations to select_idle_capacity() moved the sd->shared > assignments to "sd_asym" domain when ASYM_CPUCAPACITY is detected but > cache-aware scheduling mandates the presence of "sd_llc_shared" to > compute and cache per-LLC statistics. > > Use an "alloc_flags" union in sched_domain_shared to claim a > sched_domain_shared object per sched_domain. Allocation starts searching > for an available / matching sched_domain_shared instance from the first > CPU of sched_domain_span(sd) (sd can be sd_llc, or sd_asym). If the > shared object is claimed by another domain, the instance corresponding > to next CPU in the domain span is explored until a matching / available > instance is found. > > In case of a single CPU in sched_domain_span(), the domain will be > degenerated and a temporary overlap of ->shared objects across different > domains is acceptable. > > "alloc_flags" forms a union with "nr_idle_scan" and the stale flags are > left as is when the sd->shared is published. The expectation is for the > first load balancing instance to correct the value just like the current > behavior, except the initial value is no longer 0. > > Originally-by: Peter Zijlstra > Tested-by: Andrea Righi > Signed-off-by: K Prateek Nayak Since you wrote a nice changelog, I stuck it on top. Pushed out a fresh queue:sched/core with updated patches from Shrikanth and this on top. Seems to build and boot in a random vm, so must be good ;-) I'll push into -tip in a day or so, provided nothing goes boom in the meantime.