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 E7A3F3563C5 for ; Mon, 2 Feb 2026 09:12:46 +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=1770023571; cv=none; b=FC+qh1ea1kXqLCUGO7dIfR/dZTQgP8ucTfyKyQ+/i2nPho5uTH83gXwW8g9JAX9clERdUAK/ncOFRLpfNgA0flwHrYlMubG6IlNaB0RvBFgfqPomqjVGuqlubaWbjAd6gY/WurNHVYfx/J3XBJ6cVw20KlCIIfGBoJKtZyZ2/TQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770023571; c=relaxed/simple; bh=Z2fNodj/kiGUskOES+fQieoMaYMkBqqov8WANKjiUvM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rZrcdM8wq6YuAdDvAaC4ejgnzfbMZsnhk84V+TSzuTZfEKwD3aEZgqxwRn+sHmk3vF8PQHMG2JbcS0UrAOB03rC4NOTw02XvVKZbSaO0Xw8EJmASE+5UaDuM4A2OTEFpHfv3+fVBN94jD7m+ZlJ28QAuRKZcN/Tl3sOMzU3PRpk= 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=fFzw0loU; 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="fFzw0loU" 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=dM5JRK4rljQHl43g3+dO/ygluCIF09oGMxrcvlfm8C8=; b=fFzw0loU+5hDl69qXK0jTVm3Li g+/BgZxNvmANuDDTDePsgS5aYSWMCu9rt5d4czz5xJvMklp6yv3KWygax7ZERQlg4FoRS8jWdI0Q5 zFxQG88I1UERg0UyXc4aovlvN3AbLhnD/hx8FC/wLrtlpE292hsX8hlSUYlyyIO895rYCDXPtlN8i sXxGvufIXrO7bJK9lelCOzr3S9Lh3i1OyWYz8htNPQWx1hamrmm/7Lvj7rFrECDSReTVrBc0IyE7f cz56WFp9MvHnhPlsPva6A/xH2edjLAK5Sx2RDUzKB3FBXinOJ0abNXZuktA5rsALf+5I6E0sYeDwL oGV5IwIQ==; 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 1vmpz2-0000000E9JV-2OW5; Mon, 02 Feb 2026 09:12:36 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id D6B403021A4; Mon, 02 Feb 2026 10:12:34 +0100 (CET) Date: Mon, 2 Feb 2026 10:12:34 +0100 From: Peter Zijlstra To: Zhang Qiao 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, kprateek.nayak@amd.com, wuyun.abel@bytedance.com, dsmythies@telus.net, Hui Tang Subject: Re: [PATCH 4/4] sched/fair: Revert 6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag") Message-ID: <20260202091234.GA1395416@noisy.programming.kicks-ass.net> References: <20260130093439.803225718@infradead.org> <20260130094608.304041157@infradead.org> <716f3b5a-8a82-88e1-b684-4723882a0d6b@huawei.com> <20260131152135.GA509491@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: <20260131152135.GA509491@noisy.programming.kicks-ass.net> On Sat, Jan 31, 2026 at 04:21:39PM +0100, Peter Zijlstra wrote: > On Sat, Jan 31, 2026 at 09:47:07AM +0800, Zhang Qiao wrote: > > > > if (se->on_rq) { > > > /* commit outstanding execution time */ > > > update_curr(cfs_rq); > > > - update_entity_lag(cfs_rq, se); > > > - se->deadline -= se->vruntime; > > > + avruntime = avg_vruntime(cfs_rq); > > > + se->vlag = entity_lag(avruntime, se); > > > > > > vlag is updated here. Considering vlag and vprot share the same union, updating > > vlag will overwrite vprot. Is it right to call protect_slice() (which use vprot) > > after this update? > > Oh you are quite right; I'm sure Ingo had a patch removing that union, > but clearly that's not been merged yet. > > Sorry about that mistake; I'll make a new version on Monday. After looking at things, I think the best option is to simply remove that union. The thing is, I can fix reweight to respect this union, but there are more problems, notably the sched_change pattern will not only call put_prev_task/set_next_task, it will actually dequeue/enqueue the thing and therefore 'temporarily' use the vlag field, destroying the vprot value. And yes, we can fix all that, but I'm thinking that at that point the union is more trouble than its worth.