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 6BC0D32BF55 for ; Wed, 11 Feb 2026 09:01:59 +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=1770800522; cv=none; b=nw62s9RGJvqBGaMI6g2bLPrwgeHLEQH2NtWf8yKh0UvRDiklHcfZ6qz1z+oWCzgqEXtj2mOMHrMg3pUkjU5N55BE9ZA5AZlHWGlBxEESxx59fy56hGiexlpF5mmMxV/qQU7qtU1x0bNHLam/scw871R1qGbVFIVzaZAkfekiBN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770800522; c=relaxed/simple; bh=XIRGmrxdud88QFt+2Sws+8swuU/4Nd/1k3Wmu5cD5QA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=esx8gr4ky4p2BabT39c3kBjHC9DowyQcwbW1Uhm+I+n1n0WekNod+wNSEcJXC06UX4QWpE3pvRZHRrfS+Z7bhNUSj0Qyst1MindgFheW8oib989h1pe8VfRPQ2RxiPeoBub04pahkXgZo0xu4Lr2hnbLLv6k6lQG89SekugZLSw= 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=AlL+negc; 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="AlL+negc" 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=QjxRkvbrI83oC5EGPw7QPQtM/9slpvaeXd+0X/pD644=; b=AlL+negcPp1G/h+kHGSq2oEpWA xlpwJujWi8heZJ5xYNpFQ5j3Ne0CUAfz2X/RiE5HjU7brPIYuTMj5QAi70bX/8cxTvPHDxQo0pAFz UT+hAtSv6VBL37DCBkqlgl5YQ2Jpnw93TTf2XilTEezk2C9e0dK6FxSp7e/v14/W0w4nHbwtZF2HE M6/mcGVwCwgzTlin7bv91nrrZ1re3SWmjMT0I+/NiAYWCR0wX3hx0HchYsY3mcQyr3SYWky1WeDjm 11E4iq0mz4n1G1wkZ493bgc0FfIv5R4fON/G/xV3044ja+x7Yx2CgXdCClBKGkj5oPqhs5KK+nn6H mXATRt3A==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vq66U-00000009Rzd-09Vb; Wed, 11 Feb 2026 09:01:46 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B2056300BD2; Wed, 11 Feb 2026 10:01:44 +0100 (CET) Date: Wed, 11 Feb 2026 10:01:44 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: Doug Smythies , K Prateek Nayak , mingo@kernel.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, wangtao554@huawei.com, quzicheng@huawei.com, wuyun.abel@bytedance.com Subject: Re: [PATCH 0/4] sched: Various reweight_entity() fixes Message-ID: <20260211090144.GY1282955@noisy.programming.kicks-ass.net> References: <20260130093439.803225718@infradead.org> <4c48fe59-8ff3-41fb-83cb-869409f6fbc6@amd.com> <20260203111134.GL1282955@noisy.programming.kicks-ass.net> <38ef3462-4c4e-4f40-8d63-84dd71cbd043@amd.com> <20260209154718.GW1282955@noisy.programming.kicks-ass.net> <002501dc9b16$442a7050$cc7f50f0$@telus.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 11, 2026 at 09:49:57AM +0100, Vincent Guittot wrote: > On Wed, 11 Feb 2026 at 06:21, Doug Smythies wrote: > > > > On 2026.02.10 12:52 Vincent Guittot wrote: > > > On Mon, 9 Feb 2026 at 16:47, Peter Zijlstra wrote: > > >> On Wed, Feb 04, 2026 at 03:45:58PM +0530, K Prateek Nayak wrote: > > > > > ... delete ... > > > > > This patch w/ the patchset on top of tip/sched/core create regressions > > > for hackbench (tbench doesn't seem to be impacted) on my dragonboard > > > rb5 > > > All hackbench tests are regressing. Some results below > > ... > > > hackbench 8 group process socket > > > 0.650(+/-1%) vs 2.361(+/-8.8%) : -263% > > ... > > > > Very interesting. > > I only know of the Phoronix version of hackbench. > > I ran what I believe to be a similar scenario to yours: > > 10 test runs each (the default is 3): > > > > Kernel 6.19-rc8: 23.228 seconds average, deviation 0.39% > > Kernel 6.19-rc8-pz-v2: 85.755 seconds average, deviation 3.33% > > 269% regression. (very similar to Vicent's results) > > patch 3 + a default value for sum_shift restore the performance > cfs_rq->sum_shift = SCHED_FIXEDPOINT_SHIFT; Hurmph.. I really wanted to do away with that, because those small weights are fairly common in the cgroup shares thing, and will be more common still if we do a flat pick. > There 2 issues with patch 3 > > *one scale_load_down remains in avg_vruntime > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 25c398ff0d59..3143ae7f07b0 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -778,7 +778,7 @@ u64 avg_vruntime(struct cfs_rq *cfs_rq) > > if (weight) { > if (curr) { > - unsigned long w = scale_load_down(curr->load.weight); > + unsigned long w = > avg_vruntime_weight(curr->load.weight); > > runtime += entity_key(cfs_rq, curr) * w; > weight += w; AAARGHHH!! Sorry about that, clearly I've not been careful with reshuffling patches :-( > and we still use calc_delta_fair() in update_entity_lag() but > calc_delta_fair() use scale_load_down() Hmmm, indeed, let me see if I can do something about that. Perhaps just eat the 64bit division on 64bit systems. Anyway, let me go poke at all this.