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 78D6623184A for ; Tue, 3 Feb 2026 11:11:47 +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=1770117110; cv=none; b=ihcC0rvuqFLrPbM8y0CKINHuRmTl5Vbk3mCjF0y61SPpOrOXA0UholtkPt+8jKhsaGie/YF4s9vPeIePVRuELABOwbpTxwbouzeMIrNCuDk14SLb5z8JBUgw74TQq/C0xlSc83DVpuaj16/4RrfFMwOYAm3aKPzc43A9XSt1xG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770117110; c=relaxed/simple; bh=7dtXCoSJvyElUagMTMtYiNXglK158yUvnZKWNv9CyTw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YGYERGIMyKUzAJ2Hp8PRS9iUukoetBHzjH8LuZGXW4qwN+o5Zv1gnaTLaCfHVrW2fXpbk71ustnmM1fTbIQWLaTZivjTL1HUpmFbSjmLOgO9sadNNrLablPO6l0OcrMbom3FYyNchSWGL8nggwuhD0WZ8JTpYxwi/mJau5cnzyw= 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=Zvz7m1QP; 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="Zvz7m1QP" 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=Pt9d+tZVhWHu0uscX7tqfj4cNHsxdn/w9EckuhHePdw=; b=Zvz7m1QPNycGZdvD35pvsC3C12 7TQDF5TJXwspV1t1MrUR0V2PmIey/1Xx1GtX4Pj4BmyhyPPPbcQcqWo1z7dkTWOE5RtV3UwoW2V5f 4qQtS0UZmqlRmwkGj/fOpdhHVkKsu9+e1C9/PtdykPbKdfQdEZ6MCB59QTT5p+HltuYScmzQPTYZe pNItUnF7FD6si1GV/AYjeXFdGKHKX5HOibQ0MCA1lIODBg8UaG/AAv35CSfMzEh83i9X4h4BGOJWB vY0+1LVuolACTSwOMqyzuJSKkzZC/gXdzL+x5yU1sP0I7/YaAp82C7Mm7I/iOJQxFVYQ9v81zCapz mzOFHqKQ==; 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 1vnEJj-00000000OPA-1hZ8; Tue, 03 Feb 2026 11:11:35 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 4272E300208; Tue, 03 Feb 2026 12:11:34 +0100 (CET) Date: Tue, 3 Feb 2026 12:11:34 +0100 From: Peter Zijlstra To: K Prateek Nayak Cc: mingo@kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, 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, dsmythies@telus.net Subject: Re: [PATCH 0/4] sched: Various reweight_entity() fixes Message-ID: <20260203111134.GL1282955@noisy.programming.kicks-ass.net> References: <20260130093439.803225718@infradead.org> <4c48fe59-8ff3-41fb-83cb-869409f6fbc6@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: <4c48fe59-8ff3-41fb-83cb-869409f6fbc6@amd.com> On Tue, Feb 03, 2026 at 12:15:56PM +0530, K Prateek Nayak wrote: > Hello Peter, > > On 1/30/2026 3:04 PM, Peter Zijlstra wrote: > > Two issues related to reweight_entity() were raised; poking at all that got me > > these patches. > > > > They're in queue.git/sched/core and I spend most of yesterday staring at traces > > trying to find anything wrong. So far, so good. > > > > Please test. > > I put this on top of tip:sched/urgent + tip:sched/core which contains Ingo's > cleanup of removing the union and at some point in the benchmark run I hit: > > BUG: kernel NULL pointer dereference, address: 0000000000000051 :-( > > so something went sideways with the avg_vruntime calculation I presume. > I'm rerunning with the PARANOID_AVG feat now. > > Just re-running the particular schbench variant hasn't crashed the kernel > in the half hour it has been running so I've re-triggered the same set of > benchmarks to see if flipping PARANOID_AVG makes any difference. If you run with PARANOID_AVG, the condition ends up visible as: grep shift /debug/sched/debug If any of the fields are !0, you tripped an overflow. Once its !0, you can't get it back to 0 (except perhaps if its cgroup things, in which case you can destroy and re-create the cgroups I suppose) other than reboot. Anyway, if you can reproduce without PARANOID_AVG (or indeed have tripped overflow) could you share the specific schbench invocation you used? I'm not sure I have valuable tracing patches, I just stick random trace_printk()s in.