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 E729D34B438 for ; Thu, 19 Feb 2026 16:50:46 +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=1771519849; cv=none; b=iuiTeC+v8iDhOGtEu60EYmo3ape7SK7Vw7QncZhd5aDxUnh39m7zA0veG45eTPCVV75+49hM7C7cydgxC9NMGosdkpT+lVW5Wqwm3ptuKMQlVxC7oX0MIq/x291rYQzPfpYNGCgc+9PBW4Mn47g5f9pVWSLJn8f8ZqFSBFEkmsw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771519849; c=relaxed/simple; bh=vCF8ALOXBDBHUdfEkS+g2SKXVZHi6792TdN/8ySRAVY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u54QBr6o+Ga7Xzdo69gwHSFEcE9Nf5n20yULghicth5Uu9uoTY95hLaHl/kWvBfIS7gB1WPna6KLJdmik66nq7i2OuASVKAMEpnAIuJEFxhhzNCA4j8/YhPmY4HFjDdYaHekxlm8ow7/6lCQPUHuTZgkGUfhJmlWXA0vzMT0hDU= 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=hq+++fbt; 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="hq+++fbt" 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=H1GYVQ3wCOkKy6sW7Z3jwT79rgaQ6xWbG4iN0wmm+Qg=; b=hq+++fbt2Rvtxpxil3u42u/IKl /J56R1YKsFo9eMMtocyC6z0j3oRe4RDLOjK/CyqwIaLzSebhHqvnsVXWc07LECxt8fKjp+xQEl1HW Hl7UZgIGjyykLdV3TpD+kO4x1K5ujCXemZWLupefGiLJnCsrQTY+eoZVwKBhlKFTy58cjsesKyIBJ 4DYZBEeWNKWNFXF3U6BNGtRL/kPENuWUzpv0p81IuCL4oo6XD3IOaX+zgo6pJK/OQMVyVeOOQKtlu dM4gA6nmQLX0do2TwzUP/6saNPFcgrpTnL55X3AuaCveVIcoPF/E6RZl3LmD2bpjkfF7sltriC83w dQg7l1UA==; 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 desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vt7EB-00000001ZTG-0Qtu; Thu, 19 Feb 2026 16:50:11 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id E1EF5300B40; Thu, 19 Feb 2026 17:50:09 +0100 (CET) Date: Thu, 19 Feb 2026 17:50:09 +0100 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 v3 15/21] sched/cache: Disable cache aware scheduling for processes with high thread counts Message-ID: <20260219165009.GL1395266@noisy.programming.kicks-ass.net> References: 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: On Tue, Feb 10, 2026 at 02:18:55PM -0800, Tim Chen wrote: > +static bool exceed_llc_nr(struct mm_struct *mm, int cpu) > +{ > + int smt_nr = 1; > + > +#ifdef CONFIG_SCHED_SMT > + if (sched_smt_active()) > + smt_nr = cpumask_weight(cpu_smt_mask(cpu)); cpu_smt_num_threads ? > +#endif > + > + return !fits_capacity((mm->sc_stat.nr_running_avg * smt_nr), > + per_cpu(sd_llc_size, cpu)); > +}