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 8208E34CDD for ; Mon, 23 Feb 2026 12:37:02 +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=1771850224; cv=none; b=lJCWzQjHp6RT4EQxscuKPapm/iwXJ08VVbrNj7AOA8RfvHl6/M4GFyOk6YyG6gqMRZAYS4wXqDMfCxM5MnDAQcTQ9+IkOFGfpZ6TuTElUA0qIsdsQeVxH9DolPRagERdzaFUpsXtp35T+aY99IyVUObxTKItkcu5JdvZaXP24l4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771850224; c=relaxed/simple; bh=vnkuE71P7wEB3TeQ8f0LgFPjFN0y12zT4sXqD2xIeZ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=etiqAooYgVWueuuQmKbUT/xWwIi95hcSrgJqQo3e4N6qx8m/OdLL+LUBFzFobfiVV4Fbr9CYeCNnE2xgleSQv7jcoaA6vtADk12wOnNypnLXssvUETyE4wjKVOYv3SRg6rK78Dn6FSj1wZlduHP+SlibiRSbIIdsMh+GY4J//PU= 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=lRISb19k; 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="lRISb19k" 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=OiBv49Cthidmrj+Guae7Krqpj8IZwFFPqDpYKq1CtK4=; b=lRISb19kqbAQxZ8++Up5872uwy ogn6WTi8trKysb/9KyAcS+67HYn9JjOgiXFzY/qTe2x8Mq9fQRaqgsvn4RBM+WRBt3TsSRZ3nxDWe mizaq1cS0DVGH7KadoVge/Vt/4bCPdlQ+8pX5A3Dv7dUKSJy7pRJsNUR4SuBZSiVQGd+qULHIEQc/ WsNSM2g0JmLdyxmfkBdSfrIWpSvII+K8cjY6nfb0IykyF+Z7XRSeOxV6osrCIOkd6ECrcHmIzq70E IedHlCjTKeM+Y/Q5KEZlScOqdV6NOkzWPfahayHjDgHSnzEy3NbJCbBlonU7rf7N0hR+lHXMvNT0m 185BKy1A==; 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 1vuVBC-000000050XH-2RJ8; Mon, 23 Feb 2026 12:36:51 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 40D883008D6; Mon, 23 Feb 2026 13:36:48 +0100 (CET) Date: Mon, 23 Feb 2026 13:36:48 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: 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, kprateek.nayak@amd.com, dsmythies@telus.net, shubhang@os.amperecomputing.com Subject: Re: [PATCH v2 5/7] sched/fair: Increase weight bits for avg_vruntime Message-ID: <20260223123648.GD3031506@noisy.programming.kicks-ass.net> References: <20260219075840.162631716@infradead.org> <20260219080624.942813440@infradead.org> <20260223115100.GI2995752@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: <20260223115100.GI2995752@noisy.programming.kicks-ass.net> On Mon, Feb 23, 2026 at 12:51:00PM +0100, Peter Zijlstra wrote: > Let me go build and boot that. Seems to not explode; had it run a few things and such. Must be good. > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -679,9 +679,13 @@ static inline void > __sum_w_vruntime_add(struct cfs_rq *cfs_rq, struct sched_entity *se) > { > unsigned long weight = avg_vruntime_weight(cfs_rq, se->load.weight); > - s64 key = entity_key(cfs_rq, se); > + s64 w_vruntime, key = entity_key(cfs_rq, se); > > - cfs_rq->sum_w_vruntime += key * weight; > + w_vruntime = key * weight; > + > + WARN_ON_ONCE((w_vruntime >> 63) != (w_vruntime >> 62)); > + > + cfs_rq->sum_w_vruntime += w_vruntime; > cfs_rq->sum_weight += weight; > } >