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 E3356202F71 for ; Mon, 30 Mar 2026 09:28:10 +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=1774862894; cv=none; b=D4VHlhA064RSkIvoI+3UFMcx60SB748qY5vw8hWRs2kGZwYnZ3DCm0DK4sh1OqsQZxJvV5W9e5VClCk6vt30QxhzWoSPWv4rPROcH/jnjw3foTfY4nH/bDI79PD6aJ6/J3aVTD8JtcpnNZ8EzDsymOZvOpZE8nIgQb20C8ap/HE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774862894; c=relaxed/simple; bh=Iw0T2V/At8DQofcWiB7pTBpIrycHkUWQ7xWyc33RHTs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p5k0IDFnVcHWKV2Mpjrg4QS1J8wi6rjriIcVvs478wTm2RWOesRAuqfYkq/TuDC3Rl7yyK3sghs+WAwWiF7p9fzuuCb5oVje1RQ2knpJSrBxLzi8fZ3ZyKB4/s3vUj5YFKYpyRfRY6yxMZWUDwU2efguytnugO9+AnXdloofU2A= 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=NdiJGWCJ; 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="NdiJGWCJ" 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=0xzDz4H8QQ4I/l31MH/gKOeqidT0WkCDuE+UTGxnZAE=; b=NdiJGWCJNeBAICEsxnlUdiX8nW DDFimmubN45zWe8e2IvPX0HyGHE0Pwi4Y0ppTHmDk51qF3OOV7qQjpMHFfiBjOYsncjdVeLQLUyEz nuhUaYENQo8+VeJcCdfYxo7JDaF0dWlLfl6PU6YOCJQpvi2G3j+qXNmWRizjox/i4jkG0FkF/w82V e05bUMJuy/TcqObslxYQ3SLpKXxKkCnUL5dcLK4HwydmIE73JV1vwmSmt6ro7COT0RzykYJpPZDdA IjBHln9jQi4uJUUAxIVCXW8pGqK+Joupbx4O4eB6UBw80fDrNmQigbvGHN14mvqqqvUJcbL4JBOAZ C98qv/KQ==; Received: from 2001-1c00-8d85-4b00-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:4b00:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1w78ub-00000006ORb-3IJ9; Mon, 30 Mar 2026 09:27:57 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 044FF301BD5; Mon, 30 Mar 2026 11:27:56 +0200 (CEST) Date: Mon, 30 Mar 2026 11:27:55 +0200 From: Peter Zijlstra To: K Prateek Nayak Cc: Vincent Guittot , 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, dsmythies@telus.net, shubhang@os.amperecomputing.com Subject: Re: [PATCH v2 5/7] sched/fair: Increase weight bits for avg_vruntime Message-ID: <20260330092755.GL3738786@noisy.programming.kicks-ass.net> References: <20260219075840.162631716@infradead.org> <20260219080624.942813440@infradead.org> <20260223115100.GI2995752@noisy.programming.kicks-ass.net> <0d3680c3-3e17-47b8-8fdb-0cc1f97ffce0@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: <0d3680c3-3e17-47b8-8fdb-0cc1f97ffce0@amd.com> On Mon, Mar 30, 2026 at 01:25:59PM +0530, K Prateek Nayak wrote: > On a tangential note, now that we only yield on eligibility, would > something like below make sense? > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 226509231e67..55ab1f58d703 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9265,9 +9265,10 @@ static void yield_task_fair(struct rq *rq) > struct sched_entity *se = &curr->se; > > /* > - * Are we the only task in the tree? > + * Single task is always eligible on the cfs_rq. > + * Don't pull the vruntime needlessly. > */ > - if (unlikely(rq->nr_running == 1)) > + if (unlikely(cfs_rq->nr_queued == 1)) > return; > > clear_buddies(cfs_rq, se); Right, with the addition of sched_ext this could actually make a difference.