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 158D236A027 for ; Mon, 18 May 2026 15:07:24 +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=1779116847; cv=none; b=VIJewikg0fhsiQM7i3bB7HKW6DKAhpE1frF98CEJ2mZ7b0BcxUnrFCWyUYpp+JxdcFVESgWNFwqFTz7X5RDP4gEi1HsRgGxZKovmNHIYppKWtGaMwFJtjis2XyNSdozPDli4Fvcg0TyDo/+/AM6b/q5yTv2AnnaXcmsSs5wyI+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779116847; c=relaxed/simple; bh=5c/Y+81/cOmyCDlJMwb4oKYajhq/Y58+Mkph+prhC94=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mN/KQf55z+0fmLBFo7LLg0vN1a6lzQGwU+qz93bNv2tLF5oqUtTrmdsxi03zo2pkN9RjgTpzBj85wwpATI1+PgdWRd260ZlEZcH6bcAQTGU7GU/QOqJx8OZ1QFreFfpSigF61YcdBAJamM6af1zkvuE+gm+0HChQkRWR6gnzlgM= 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=iCM1/pjY; 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="iCM1/pjY" 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=oP95quYGeAV/8JIjBTU1sBh0KFeEwaCciy7Z/WjPNtQ=; b=iCM1/pjYvgM+SFbdgRWfraOxFm nCB0fnGon8PRcCoNy/9f8Y9tKZ2L3Y942AhiNHXHGlpoTa0cbPUt4gbugj0d6+h5U/2Ede9xzlq8C WDvVie7hdWOQjcN+eh61ogF3v6COB4c5ctSAig4kvf8qknEh8WOSXuC4UIT0uSyfSe9mWaAshYdMH MFE4OtH/67hRdZIy4PY/rZ8PllYUEJGX0IaNk+r9vfrC9+XzusWHtC8o+krDmDupxHdDL/TdcYKKK 1ToWX8q5do2ExFs64NKVSlMbiQ1t3YKLSY/zlC97d9380gOHW5f7frIXmuG3Qzo7MZPi4qGrnwnMA l4982IPg==; 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.99.1 #2 (Red Hat Linux)) id 1wOzYA-00000004t5W-1o1V; Mon, 18 May 2026 15:06:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 06E9A3001D0; Mon, 18 May 2026 17:06:33 +0200 (CEST) Date: Mon, 18 May 2026 17:06:32 +0200 From: Peter Zijlstra To: Tim Chen Cc: Ingo Molnar , K Prateek Nayak , Vincent Guittot , Chen Yu , 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 , Luo Gengkun , linux-kernel@vger.kernel.org Subject: Re: [Patch v4 13/16] sched/cache: Fix cache aware scheduling enabling for multi LLCs system Message-ID: <20260518150632.GW3102624@noisy.programming.kicks-ass.net> References: <6328a8a7f40925cec2a712d81ee58128a4c4444a.1778703694.git.tim.c.chen@linux.intel.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: <6328a8a7f40925cec2a712d81ee58128a4c4444a.1778703694.git.tim.c.chen@linux.intel.com> On Wed, May 13, 2026 at 01:39:24PM -0700, Tim Chen wrote: > From: Chen Yu > > If there are multiple LLCs in the system, cache aware scheduling > should be enabled. However, there is a corner case where, if there > is a single NUMA node and a single LLC per node, cache aware > scheduling will be turned on in the current implementation - > because at this moment, the parent domain has not yet been > degenerated, and it is possible that the current domain has the > same cpu span as its parent. There is no need to turn cache aware > scheduling on in this scenario. > > Fix it by iterating the parent domains to find a domain that is > a superset of the current sd_llc, so that later, after the duplicated > parent domains have been degenerated, cache aware scheduling will > take effect. > > For example, the expected behavior would be: > 2 sockets, 1 LLC per socket: MC span=0-3, PKG span=0-7, has_multi_llcs=true > 1 socket, 2 LLCs per socket: MC span=0-3, PKG span=0-7, has_multi_llcs=true > 2 sockets, 2 LLCs per socket: MC span=0-3, PKG span=0-7, has_multi_llcs=true > 1 socket, 1 LLC per socket: MC span=0-3, PKG span=0-3, has_multi_llcs=false > > This bug was reported by sashiko. > > Fixes: d59f4fd1d303 ("sched/cache: Enable cache aware scheduling for > multi LLCs NUMA node") FWIW, this and the next patch have this Fixes: line mangled -- I fixed it. But please figure out what did that so it doesn't happen again.