From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 5B6CF21D3F3 for ; Fri, 13 Feb 2026 06:44:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770965079; cv=none; b=rcA6Jxy4C9ushZNVXurvpZHkCgQIN3VTMz34zfy5r/V9DhR1njR3Sx3AOFJpRM25NGlE9VsrrPJXNGaooFuGeADoEc8TSKRr02FhQDswXlW6i6NpdF4qdh4nrQlljHEfk7zOgQf+F1CQsrQ40aJG/h7uzKpizE1/M/n3OAlxtZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770965079; c=relaxed/simple; bh=N71PlSjkWyuHs+yTdUT/rwDx+zokjN7Rq9Wg1mTW1S4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BVTTO/zPQUw2zVeVx6harqChheVeFDmjPRiVoNqg9+J3j779q8iBIOR+eH4IzTz+IDQw5AWVN9BhwxesSl6naDy+LUvaC7z7Dwwcor8artklwVY/EU6WbRYt/Xj5R916BsvHbSb94FsNkbZsjiafzwqEvimTtHz/aVi56fXdFUg= 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=pB/Pg4hD; arc=none smtp.client-ip=90.155.50.34 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="pB/Pg4hD" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=Vizvu+T2kFtd7fk4uJ/W1BVxmeWIR1O6/Va5ZqhCv8s=; b=pB/Pg4hDJG6fqNt8yVjeAzUCWK UV2ToSrzui8RyExauAjmM4qvJ5RnPiMqCqEiGoPpsjQl3DIk++PfdSfSCtz0Jlz/a4uhOkxRn4xGg EPaObLhB6R/ebO5xhaViFEX/UyZt8tH21rZWdjh/x2a6I7WDf/niA9RQCYKyKWBzNcooesS9pNRUI y7Qlhgjp8UYVey7GkDGZ3cPUgBn+G4wv0YEa0dfmPWSitIE//0fB8yurJj175LXJgIdOC3dGyS9yh tDKvEM/+XAHOiQxdWqhMwU8K09deNEJypGRb+5hC3lTx6iZfKbAou+0RpanCDLUziFPL+e0meExWm RnDrAXZA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqmuf-0000000FIyq-10cn; Fri, 13 Feb 2026 06:44:25 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 1417F300969; Fri, 13 Feb 2026 07:44:24 +0100 (CET) Date: Fri, 13 Feb 2026 07:44:23 +0100 From: Peter Zijlstra To: K Prateek Nayak Cc: Vincent Guittot , Doug Smythies , 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: <20260213064423.GB3088714@noisy.programming.kicks-ass.net> References: <20260211090144.GY1282955@noisy.programming.kicks-ass.net> <20260211104833.GH1395416@noisy.programming.kicks-ass.net> <20260211162825.GZ1282955@noisy.programming.kicks-ass.net> <58c6c115-f544-4c51-990c-a3ad2fbf701a@amd.com> <20260212115943.GB1282955@noisy.programming.kicks-ass.net> <20260212171611.GL1395416@noisy.programming.kicks-ass.net> <20260212193140.GR1395266@noisy.programming.kicks-ass.net> <27217771-325a-4545-8a12-80dc6ff5112f@amd.com> 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: <27217771-325a-4545-8a12-80dc6ff5112f@amd.com> On Fri, Feb 13, 2026 at 10:52:38AM +0530, K Prateek Nayak wrote: > On 2/13/2026 1:01 AM, Peter Zijlstra wrote: > > On Thu, Feb 12, 2026 at 06:24:27PM +0100, Vincent Guittot wrote: > > > >>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > >>> index 5b1a2abb727e..de155be02411 100644 > >>> --- a/kernel/sched/fair.c > >>> +++ b/kernel/sched/fair.c > >>> @@ -797,7 +797,11 @@ u64 avg_vruntime(struct cfs_rq *cfs_rq) > >>> if (runtime < 0) > >>> runtime -= (weight - 1); > >>> > >>> +#ifndef CONFIG_64BIT > >>> delta = div_s64(runtime, weight); > >>> +#else > >>> + delta = runtime / weight; > >>> +#endif > >> > >> Good catch > >> > >> Don't we have the same problem with the div_s64 in place_entity ? > > > > Indeed so. Let me go fix both and push out a new set. I'll post all the > > patches tomorrow once the robot has blessed them. > > rescale_entity() adds a bunch more of those. Don't those need changing > too? (I'm looking at the current sched/core at b4d41dc4bf30). And a > wrapper around this pattern would be much appreciated with the amount > of ifdeffry that gets added rescale_entity() should be okay, that's just a single entity and not a weight sum. As to wrapper, I just went through math64.h and it appears we have div64_long() that might just DTRT, but I really need to go wake up first. And as you noted, the current branch doesn't boot :/ No idea what I messed up last night, but I did push without test building. I only folded those two division fixed and figured what could possibly go wrong :-) Anyway, let me get the kids to school, have breakfast and I'll go figure out WTF I messed up.