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 77FE6366814 for ; Wed, 11 Feb 2026 10:49:54 +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=1770806998; cv=none; b=DPi6pAr2NpkZifqeTDcoDpsS7q4xCU+kY3j4ozAQDExo5bcHuXwN4ns6mX5vy/WTPIsWbi2yRyNet2AaLR175wP8/piZQlS7H2EK9ApSv+57aaQWTPgz6XFjG3OTDpxxVF85gV2kCrRuhDg7Z/b6rtMsIGIK8D8dXnV2w4o0ItY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770806998; c=relaxed/simple; bh=/zW+GsifoZvKIR2QIX+jXKm0F4a4f5gKltO7uzJYIVM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V2NdKD/Isl7U7lt77JXaCzqBkL4PmuHzAiKi0PK8QgoaS0hYdhloFPF1i2jAkzhLtxgKTeXM/YtUR4uL5pa6HnA+d+VZUS3+Dob1LiTjO0kzSH7W6qQ04OEwVhI2OTAIA6G9hf1PhLY12q/FKBp2FUMXxTpPwDnZAbmMoMX1IZo= 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=NakVDCkt; 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="NakVDCkt" 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=BL5wUzqjrqn4zfQumXHwT7KpdDMECtwMP+D3uvB2z1w=; b=NakVDCkt0rRJL5IqoW5EAtPy2S JTJ3IASYMfFFnMsAC8Gx9irmKECCtOWJnkpWokiUHrxJD1yARDkG1E5iBtbUkmjq5wkRUbbhtn0Mo 0ifiHir8bvNtocqOQzhwAC9+5xA6IGPhf6VVpiWsu23jS7aMKvsZz8R93gmueo4jxQ+KFVswDNKnv UcefXizzJjqjUJmduKzZRkYf76pzWkp8A1YGx6k0COU24v4FnXQOhifjnc58haQKf69h0WHenoZbB Ui9tsFGyxhiCLgPDBtsxRK8i5nO2TKlvqR36DNFmUs9ZXyEa99qkxbYO1THxAIMuwoKHSRxEZSBLw d3fmKZoQ==; 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 1vq7n1-00000009bFJ-3dTz; Wed, 11 Feb 2026 10:49:48 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7343A300BD2; Wed, 11 Feb 2026 11:49:47 +0100 (CET) Date: Wed, 11 Feb 2026 11:49:47 +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: <20260211104947.GI1395416@noisy.programming.kicks-ass.net> References: <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> <20260211090144.GY1282955@noisy.programming.kicks-ass.net> <20260211104833.GH1395416@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: <20260211104833.GH1395416@noisy.programming.kicks-ass.net> On Wed, Feb 11, 2026 at 11:48:33AM +0100, Peter Zijlstra wrote: > On Wed, Feb 11, 2026 at 10:01:44AM +0100, Peter Zijlstra wrote: > > > > 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 :-( > > So with that one fixed; I get (as queue/sched/core of just now): In case this wasn't clear; this is hackbench as per: for i in 1 2 5 10 20 40 ; do echo -n "${i}: " perf stat --null --repeat 10 -- perf bench sched messaging -g $i -t -l 10000 2>&1 | grep "seconds time elapsed" done > base: > > 1: 0.25431 +- 0.00226 seconds time elapsed ( +- 0.89% ) > 2: 0.52522 +- 0.00304 seconds time elapsed ( +- 0.58% ) > 5: 1.10452 +- 0.00509 seconds time elapsed ( +- 0.46% ) > 10: 2.00673 +- 0.00761 seconds time elapsed ( +- 0.38% ) > 20: 3.81795 +- 0.00347 seconds time elapsed ( +- 0.09% ) > 40: 7.0551 +- 0.0112 seconds time elapsed ( +- 0.16% ) > > +1 patches/peterz-sched-fair-fix-zero_vruntime.patch > > 1: 0.25231 +- 0.00328 seconds time elapsed ( +- 1.30% ) > 2: 0.52794 +- 0.00337 seconds time elapsed ( +- 0.64% ) > 5: 1.09336 +- 0.00391 seconds time elapsed ( +- 0.36% ) > 10: 1.98787 +- 0.00660 seconds time elapsed ( +- 0.33% ) > 20: 3.75865 +- 0.00782 seconds time elapsed ( +- 0.21% ) > 40: 7.0208 +- 0.0102 seconds time elapsed ( +- 0.15% ) > > +2 patches/peterz-sched-fair-curb-set_protect_slice.patch > > 1: 0.25421 +- 0.00351 seconds time elapsed ( +- 1.38% ) > 2: 0.53178 +- 0.00308 seconds time elapsed ( +- 0.58% ) > 5: 1.09421 +- 0.00462 seconds time elapsed ( +- 0.42% ) > 10: 1.99843 +- 0.00289 seconds time elapsed ( +- 0.14% ) > 20: 3.77249 +- 0.00676 seconds time elapsed ( +- 0.18% ) > 40: 7.0371 +- 0.0143 seconds time elapsed ( +- 0.20% ) > > +3 patches/wang_tao-sched_eevdf-update_se-_vprot_in_reweight_entity.patch > > 1: 0.25141 +- 0.00342 seconds time elapsed ( +- 1.36% ) > 2: 0.53294 +- 0.00474 seconds time elapsed ( +- 0.89% ) > 5: 1.10944 +- 0.00447 seconds time elapsed ( +- 0.40% ) > 10: 2.00012 +- 0.00366 seconds time elapsed ( +- 0.18% ) > 20: 3.77650 +- 0.00796 seconds time elapsed ( +- 0.21% ) > 40: 7.0455 +- 0.0145 seconds time elapsed ( +- 0.21% ) > > +4 patches/peter_zijlstra-sched_fair-increase_max_lag_clamping.patch > > 1: 0.25096 +- 0.00415 seconds time elapsed ( +- 1.65% ) > 2: 0.53635 +- 0.00372 seconds time elapsed ( +- 0.69% ) > 5: 1.12040 +- 0.00549 seconds time elapsed ( +- 0.49% ) > 10: 2.00447 +- 0.00518 seconds time elapsed ( +- 0.26% ) > 20: 3.7682 +- 0.0104 seconds time elapsed ( +- 0.28% ) > 40: 7.0023 +- 0.0141 seconds time elapsed ( +- 0.20% ) > > +5 patches/peterz-sched-increase-avg-bits.patch > > 1: 0.24866 +- 0.00284 seconds time elapsed ( +- 1.14% ) > 2: 0.52756 +- 0.00310 seconds time elapsed ( +- 0.59% ) > 5: 1.09946 +- 0.00643 seconds time elapsed ( +- 0.58% ) > 10: 1.98256 +- 0.00398 seconds time elapsed ( +- 0.20% ) > 20: 3.75988 +- 0.00611 seconds time elapsed ( +- 0.16% ) > 40: 6.9833 +- 0.0113 seconds time elapsed ( +- 0.16% ) > > +6 patches/peterz-sched-revert-reweight-entity-thingy.patch > > 1: 0.25302 +- 0.00285 seconds time elapsed ( +- 1.13% ) > 2: 0.53040 +- 0.00383 seconds time elapsed ( +- 0.72% ) > 5: 1.08806 +- 0.00341 seconds time elapsed ( +- 0.31% ) > 10: 1.97696 +- 0.00592 seconds time elapsed ( +- 0.30% ) > 20: 3.75393 +- 0.00622 seconds time elapsed ( +- 0.17% ) > 40: 6.9794 +- 0.0139 seconds time elapsed ( +- 0.20% ) > > > Now let me go check on that latency thing from Doug (although hopefully > that was the same boo-boo).