From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 0813637F8BD; Tue, 30 Jun 2026 09:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782810225; cv=none; b=axnWmXTT99NrAqK/wHfu2ybe1d/vuJ8VE1yXzJDMmUuaJ3jBRL6LL/zEzjt0dLLy7I2nWFv88hq0cg1Gp5zjSMhwPXoCUe9dOu+U7f3ELi9AE9f8yMo/1pYBDoQdhp4f8WPzmCtjQNxq8FS5GS/eStJFeqNjNgYJuRDIqe+f4ZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782810225; c=relaxed/simple; bh=dIcQLuytkE8gwC2ZL2hYYQ49k/ssRnHTqY5uOizjY0I=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=PbbtKBYJ4cpLHNE7LA6SEwqFeBCjDqlIDYk8Hi3SLKSencaqKx4O0Mnsw4KxMuWzNv8cj2YswfcDmSXxibKY61qwxNpX0yHKYqiZ6UPtEVwvaM87iFi6OfP/RxD1xHxyFzHCKv0EeolwX6/Dpr15QxWJtbbGcMljcIkfHKuumMc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Hlam8zbD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=r2WURKh3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Hlam8zbD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="r2WURKh3" Date: Tue, 30 Jun 2026 09:03:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1782810222; 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=rrx4MpKEZA30bzO1QdJo5AxFuWDdb37FWb0jvAIeLFQ=; b=Hlam8zbDHbxEATKlM2SIuaz9CzqRsF5e8oSg8new328giVOEEWu/DuZFRg2MfLArVFS9fz aYfShM8ViAKWbA0NdghrKvSqi8lXte0qKrkJhmQ3xW2UiUhbmWlEnBtVsgW5+eLHWXvGlI E5W1yFb3op4l5PI+Fl8xfkX3dbkh+PJiNM8178Eoy0B2+aaoBAoB/V0IcEiAyBz8ZNgDi5 YjwOj5D/I3EBK0CJd6WvPpwjLYMElWKk7S65noMUP+dHDDXyfNYzFpaeeKWVUutryo5UiA IWkxP9lCB+q/ZlKsky0pgTbtoOvuKh5E1F7Nx23bzMJBD06ikM13ZDD58V21HA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1782810222; 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=rrx4MpKEZA30bzO1QdJo5AxFuWDdb37FWb0jvAIeLFQ=; b=r2WURKh3mFTsKtcHb5iS4hUGfO1tLeEGC4gMwX8n0Vt9Ksh0AHpzTKUNOz405R1YxTytov atUhzAek73PiCuDQ== From: "tip-bot2 for Vincent Guittot" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/eevdf: Always update slice protection Cc: Vincent Guittot , "Peter Zijlstra (Intel)" , K Prateek Nayak , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260624151229.1710703-6-vincent.guittot@linaro.org> References: <20260624151229.1710703-6-vincent.guittot@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178281022132.3843924.5115473877230562104.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/core branch of tip: Commit-ID: 7cd2ef17de5e11612001e98b6319f1793239b243 Gitweb: https://git.kernel.org/tip/7cd2ef17de5e11612001e98b6319f179323= 9b243 Author: Vincent Guittot AuthorDate: Wed, 24 Jun 2026 17:12:28 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 30 Jun 2026 10:56:55 +02:00 sched/eevdf: Always update slice protection Even if p will not preempt current, it modifies the avg_vruntime and possibly the min slice. Make sure to update the slice protection with the updated figures. As an example, Batch and Sched Idle tasks can otherwise get a larger lag than their slice and finaly delay the scheduling of a normal task, which deadline will be a later. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Tested-by: K Prateek Nayak Link: https://patch.msgid.link/20260624151229.1710703-6-vincent.guittot@linar= o.org --- kernel/sched/fair.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9046b2e..2547a97 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9867,16 +9867,17 @@ static void wakeup_preempt_fair(struct rq *rq, struct= task_struct *p, int wake_f if (cse_is_idle && !pse_is_idle) goto preempt; =20 + update_curr_fair(rq); + if (cse_is_idle !=3D pse_is_idle) - return; + goto update; =20 /* * BATCH and IDLE tasks do not preempt others. */ if (unlikely(!normal_policy(p->policy))) - return; + goto update; =20 - update_curr_fair(rq); /* * If @p has a shorter slice than current and @p is eligible, override * current's slice protection in order to allow preemption. @@ -9893,7 +9894,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct t= ask_struct *p, int wake_f * EEVDF to forcibly queue an ineligible task. */ if ((wake_flags & WF_FORK) || pse->sched_delayed) - return; + goto update; =20 /* Prefer picking wakee soon if appropriate. */ if (sched_feat(NEXT_BUDDY) && set_preempt_buddy(cfs_rq, pse)) { @@ -9934,7 +9935,7 @@ pick: */ if (preempt_action =3D=3D PREEMPT_WAKEUP_SHORT && entity_eligible(cfs_rq, p= se)) goto preempt; - +update: if (sched_feat(RUN_TO_PARITY)) update_protect_slice(cfs_rq, se); =20