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 4F9733C2B95 for ; Fri, 14 Aug 2026 14:17:04 +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=1786717034; cv=none; b=u/FlaW/niQkPBAj0pRnnsTDdQQqBeJvDsbl9Ql3jviWjc83SCuAr7TWg4Q+OOfpay1CJuw/ZHyuQqTNl6Nn0HZbJmpQPkEAvqqiaYAGDvRmHtrRTHwg9ZqVzp+9NAfKtUYjFA4fVIudQ+Q7aqM5mCg4SuhaJmYS+LBhYphp15W4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786717034; c=relaxed/simple; bh=fLyidrfSpGM0tSlEREJMbEXVptpJ60K6G4cjKAiViKo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s1t6WUF9/fmxX748BuwYYlhvbagfC2UObUioPXmQNhnIarJNhoiBB8Pgi00ZzTebwjRZKn9BJcucn1zP1oQuqktFql3sFnUG1y8Ts0D9iikP0AbYVGSOLeBTyZJwDwC2Q6eqiYCud2B0XzG5PGbXEtGQQJXaMorHAHyuWLTIFTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=HlpGhAZ5; 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=pass 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="HlpGhAZ5" 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=HyBMkYi+1WKsFgucNOl+8jJyyVsbYp/XkJAdr1xIlCM=; b=HlpGhAZ55ZRD1Vkj7qvDmupTBA yJu0DmMA8xXaHAY7c0D3eueLUw4jGYY+b2qsrmjdjS0BhM8nbNsiWiMNIWdQyUD/6FwNe9/y78LL/ fyhJHuwHQxNzJc2BqxHhcsvPNu6PSuZD5xslgRyEdw+rgGO+Hhm+0Zf+Vd0JJdhZ8UZQ45xcYVKt3 izCnZcinM1lACchirFKksbbcpwSLooSqvg4YZpaqdvKEAuRfmAO/uP3nRf0RCnNRg12WZKe/sMWHe jXuYEuv26n9MIYw4t51IgIOE1wQtrka0y22F9hRu/HeEk2L/qvxNDZBOrS2SRI4nK5LpKH/p/rTpJ MKJ8xwxw==; 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.99.1 #2 (Red Hat Linux)) id 1wusiM-00000005J4T-1Nrf; Fri, 14 Aug 2026 14:16:54 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 54B4F302FFB; Fri, 14 Aug 2026 16:16:53 +0200 (CEST) Date: Fri, 14 Aug 2026 16:16:53 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: mingo@redhat.com, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/fair: Fix flat hierarchy Message-ID: <20260814141653.GB687043@noisy.programming.kicks-ass.net> References: <20260812125039.1717249-1-vincent.guittot@linaro.org> <20260812140331.GN776954@noisy.programming.kicks-ass.net> <20260813103155.GC1246887@noisy.programming.kicks-ass.net> <20260814112222.GY687043@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: On Fri, Aug 14, 2026 at 02:51:20PM +0200, Vincent Guittot wrote: > On Fri, 14 Aug 2026 at 13:22, Peter Zijlstra wrote: > > > > On Fri, Aug 14, 2026 at 11:26:13AM +0200, Vincent Guittot wrote: > > > > > For the enqueue, the 1st requeue_delayed_entity() which is the main > > > path for delayed task, requires the update. Then another one before > > > reweight_eevdf(cfs_rq, se, weight, false); in the !curr case. > > > > > > But I'm not sure we want to spread this in different places. > > > > Fair enough. I'll test the below and then push to sched/urgent. > > I tested this patch on sched/core. > > That being said, 7.2 wants something like below for requeued_delayed_entity() > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index fd3edf72fb6e..3defda0e2f83 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -7802,6 +7802,8 @@ requeue_delayed_entity(struct sched_entity *se) > WARN_ON_ONCE(!se->sched_delayed); > WARN_ON_ONCE(!se->on_rq); > > + update_curr(cfs_rq); > + > if (update_entity_lag(cfs_rq, se)) { > cfs_rq->nr_queued--; > if (se != cfs_rq->curr) > > So I would put the cahnge above in sched/urgent and the patch > discussed here in sched/core Right. I've pushed out sched/urgent and sched/core to queue.git. If you could double check that, I'll push them out to tip later today. For now, I'm going to go melt someplace outside for a bit.