From nobody Tue Dec 16 11:06:44 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8DD8E7544B for ; Tue, 3 Oct 2023 10:42:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231764AbjJCKms (ORCPT ); Tue, 3 Oct 2023 06:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231688AbjJCKmo (ORCPT ); Tue, 3 Oct 2023 06:42:44 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C204CC; Tue, 3 Oct 2023 03:42:41 -0700 (PDT) Date: Tue, 03 Oct 2023 10:42:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696329758; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=grakLp/zKCRntxJXoxdacCz+WQGAMempoTpcbELkjtw=; b=h//JyklV+UfhJok2GoSaCoO3WIMDa8IIF6CS8yWIOUbBAqrwjr2Cc6egxisXHBH2dFcSEj GMamkX4q0HlO674s7b92e2720F2z+hkKaUfKGyQo9XYDxBMe8k4f2HnxlBltzmAgv/hUMw TsL/kUl52clwytEUSmHGw5J09qp2OpSl/E3qjGak9Lrl+6AVAC0a/lv0CHblDWEguLX6qT hJZQDggLGNg1x/DoW/j/vhcw7yXrIF79u0B4Idiwx80pGcAzHBd54L/LbDx9O/plXRDWKM Yy1TRoxWM4VhwPbKnOH36E1OfvGTq0fQ2ng1paxxgh4KSJa/VUQjIdUViNacwA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696329758; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=grakLp/zKCRntxJXoxdacCz+WQGAMempoTpcbELkjtw=; b=Ce6BAYVZuFfPMDWwD1kc69Gglnpwqjyh/9TD+crnlC/58YTnTnbFV/qhI0+ImAainhPaiX JjR2reDWW3wCdXAQ== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/eevdf: Also update slice on placement Cc: "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230915124822.847197830@noisy.programming.kicks-ass.net> References: <20230915124822.847197830@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Message-ID: <169632975832.3135.8276089037477460761.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 2f2fc17bab0011430ceb6f2dc1959e7d1f981444 Gitweb: https://git.kernel.org/tip/2f2fc17bab0011430ceb6f2dc1959e7d1= f981444 Author: Peter Zijlstra AuthorDate: Fri, 15 Sep 2023 00:48:55 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 03 Oct 2023 12:32:29 +02:00 sched/eevdf: Also update slice on placement Tasks that never consume their full slice would not update their slice valu= e. This means that tasks that are spawned before the sysctl scaling keep their original (UP) slice length. Fixes: 147f3efaa241 ("sched/fair: Implement an EEVDF-like scheduling policy= ") Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230915124822.847197830@noisy.programming.= kicks-ass.net --- kernel/sched/fair.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index cb22592..7d73652 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4919,10 +4919,12 @@ static inline void update_misfit_status(struct task= _struct *p, struct rq *rq) {} static void place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) { - u64 vslice =3D calc_delta_fair(se->slice, se); - u64 vruntime =3D avg_vruntime(cfs_rq); + u64 vslice, vruntime =3D avg_vruntime(cfs_rq); s64 lag =3D 0; =20 + se->slice =3D sysctl_sched_base_slice; + vslice =3D calc_delta_fair(se->slice, se); + /* * Due to how V is constructed as the weighted average of entities, * adding tasks with positive lag, or removing tasks with negative lag