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 52AE63D6684 for ; Wed, 25 Feb 2026 15:44:22 +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=1772034264; cv=none; b=IXV6pwK9NSafsvr0RQxuseBnPMJKwUAR2HSPsefuJk9fgu/8MOQLgjaDniA/DRdf9Om2wRzKW9lfGHBikSnVUKrykh5pAXBsbjwHCrD1aCmWjhplxFobDKp75EH3tkI2PWBw9Padf7L4gUpG6njZcWpfYmJ7jAmcI1LHVBR9xxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772034264; c=relaxed/simple; bh=F6osqCRLoXTaLuvVZgsZhh6buTkcaRjOZKGNf0+wHcg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=atU7VcJ7lbIpwSu1pW8Am/aErDndoG6WSUqhbgiJCvkbJ6soIMENmnDSnr9QUq0VJyn6g3KhM9a46mhlUdZF0ps2hY2ObsEtSwnW55MdrLI4RoAviVYKYudpiaeIKuHBL1zwop3ck3hl6kW0NQCbRoNFmPrvGRscTyN46Jd7sKk= 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=DSvwwYQ6; 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="DSvwwYQ6" 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=T8G7P2fJWRjBQbR/GN+p50iPaq0yubtRKadcDYjlQCo=; b=DSvwwYQ6Kww2PDZlCXKPtslW9a kvHV9/1LoBuTdQtPTwS2AUbgbSNbvAsa0H/mY069a5x5Vdk/stl70ke+Jw2A3N4jDQEEtzoEjPD/e 6thiFna9PxaGSRc+q3FosnRw3xsK780THX5i19xA3aNOKNr1cMi69lrJhQkBuiUVw84hGZrsXimLM ZxYa4+3sZyN1mmm8Lv+0+Eh0sqRbeIvjnnMRSv8eZgBuFZxJmPsgxhkWHpT2dD8kKzmAqiOijIRB3 prpsYoXlemJLy94AgvqMwdgJV0pR+MQ1y9UUcx7NY81QwZjBT8MYYgf1FfYuvJbaQ+yrnrBV688Ba M+m6wFGQ==; 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 1vvH3a-00000009JfG-3NXH; Wed, 25 Feb 2026 15:44:10 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id D63003007C4; Wed, 25 Feb 2026 16:44:09 +0100 (CET) Date: Wed, 25 Feb 2026 16:44:09 +0100 From: Peter Zijlstra To: "Chen, Yu C" Cc: Kyle Meyer , tim.c.chen@linux.intel.com, bp@alien8.de, dave.hansen@linux.intel.com, mingo@redhat.com, tglx@kernel.org, vinicius.gomes@intel.com, brgerst@gmail.com, hpa@zytor.com, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org, patryk.wlazlyn@linux.intel.com, rafael.j.wysocki@intel.com, russ.anderson@hpe.com, x86@kernel.org, zhao1.liu@intel.com Subject: Re: [PATCH v2] sched/topology: Check average distances to remote packages Message-ID: <20260225154409.GD1282955@noisy.programming.kicks-ass.net> References: <20260223170314.GU1395266@noisy.programming.kicks-ass.net> <20260225123052.GN3016024@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: On Wed, Feb 25, 2026 at 11:39:54PM +0800, Chen, Yu C wrote: > > +static int slit_cluster_distance(int i, int j) > > +{ > > + static int u = 0; > > + long d = 0; > > + int x, y; > > + > > + if (!u) > > + u = slit_cluster_size(); > > + > > + /* > > + * Is this a unit cluster on the trace? > > + */ > > + if ((i / u) == (j / u)) > > + return node_distance(i, j); > > the u is 3 in above example, because slit_cluster_size() > found that node0, node1 and node2 are in the same biggest > symmetric cluster. > Not sure if I understand it correctly, > here we will treat node4 and node5 as the same cluster, > but without checking whether node_distance(4, 5) and > node_distance(5,4) are the same. If node_dist(4,5)!=node_dist(5,4), > will we keep it as it is? Yes, so this assumes that all u sized clusters on the trace are similar and 'sane' without verification.