From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 A6E982749EA for ; Thu, 9 Apr 2026 12:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775739343; cv=none; b=tEUS07PttZtf6mPJ5sXyKAw0SvXP+sG1/1yziDyMn3siHp8zLZ93tpvANdUWgbgjz8J3S0Vdfok4Pv501nRBaLDK9bt1940zvItnQn+DAFCiqyYPi2CRoaytQq6vXkJjf/markVNNP3IJqvkz5n/V/FUxS+bR83hdUzvrGQR8sc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775739343; c=relaxed/simple; bh=hADP6Wn+IUC1v/lZr715q396VCVath6ykPwSqRfrGso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jA3Znn9EeHGBX7WXz0gwxQ3HCFkXgEBp63AQERIo2hrGA35j0RMRz7Tk/0xtfoN8kDD6O0kasixEfHEjM7/5vpR1BSCFTvH21D5OBG+3BM7eOy1VJ5BuafnSn50igPHKhhNEosTXUXDhOH9q22aeXN0ov8DxeigJ1mEZAOzEQmQ= 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=CIH0fzfp; arc=none smtp.client-ip=90.155.92.199 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="CIH0fzfp" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=HUos2i3dl2l7u5x9YmdlKw7QQlFoyJYU6vWOXjdBcSU=; b=CIH0fzfpCr8agZuJDjOYxLPsbl Tx8JXlETLc3HnO5d8IeguoGX7EDytC0ries/moO0KGLVelBso7UlswlMMDAa/88QJH0RuTyILaw8b lSMs0QO8TGRVhYsgaEaVnayA1Haf3w+SH3EmTNl8wGQJGfSXI9Cq0FWtxa1TH2a0pK0wHOADqHZq8 lrga4h/3uu2DoDuhA/pfji3DWOsAqGJS3VXw0Nks8EFcxLr59Ae6fPAkmFl2hufqr98I+JlgZItmx jz6EhLEXlKB7NlqdLlPql/vUjePdZGTvWgxqgsywfyVwc6jvlG/FB7Bsk0ww76VN/iL4esK8KXbot ocMG8pCw==; 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 desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1wAouk-0000000BiPA-0CnA; Thu, 09 Apr 2026 12:55:18 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7F453302D3E; Thu, 09 Apr 2026 14:55:17 +0200 (CEST) Date: Thu, 9 Apr 2026 14:55:17 +0200 From: Peter Zijlstra To: Tim Chen Cc: Ingo Molnar , K Prateek Nayak , "Gautham R . Shenoy" , 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 , linux-kernel@vger.kernel.org Subject: Re: [Patch v4 17/22] sched/cache: Avoid cache-aware scheduling for memory-heavy processes Message-ID: <20260409125517.GA3102924@noisy.programming.kicks-ass.net> References: <339bb2636c7306e17540268a9295a8e673b92804.1775065312.git.tim.c.chen@linux.intel.com> <20260409124642.GC3126523@noisy.programming.kicks-ass.net> 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: <20260409124642.GC3126523@noisy.programming.kicks-ass.net> FWIW, I'm going to start auto-stripping *@gmail addresses soon. I'm getting sick and tired of those bounces. If Google doesn't care, I can't be arsed either. On Thu, Apr 09, 2026 at 02:46:42PM +0200, Peter Zijlstra wrote: > On Wed, Apr 01, 2026 at 02:52:29PM -0700, Tim Chen wrote: > > From: Chen Yu > > > > Prateek and Tingyin reported that memory-intensive workloads (such as > > stream) can saturate memory bandwidth and caches on the preferred LLC > > when sched_cache aggregates too many threads. > > > > To mitigate this, estimate a process's memory footprint by comparing > > its RSS (anonymous and shared pages) to the size of the LLC. If RSS > > exceeds the LLC size, skip cache-aware scheduling. > > > > Note that RSS is only an approximation of the memory footprint. > > By default, the comparison is strict, but a later patch will allow > > users to provide a hint to adjust this threshold. > > > > According to the test from Adam, some systems do not have shared L3 > > but with shared L2 as clusters. In this case, the L2 becomes the LLC[1]. > > This is pretty terrible. If you want LLC size, add it to the topology > information (and ideally integrate with RDT) and make proportional to > cpumask size, such that if someone cuts the domain in pieces, they get > proportional size etc. > > Also, if we have NUMA_BALANCING on, that can provide a much better > estimate for the actual size. > > Just using RSS seems like a very bad metric here. >