From nobody Mon Jun 15 13:57:30 2026 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 E709872631; Fri, 10 Apr 2026 14:34:09 +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=1775831651; cv=none; b=K5nDkBt9/rq1qdcHASbVUNxFzwy/sGYdrqFy0W45mw/dKrhQlgxWLZfh7rZRnVhWULgrH91c+H07gjQxSPPtoGcgU86fnNdOV+gLKH93TuqA+DXTgaWT0pWjdsj9pePXdusXqkm8i7eGlu4OnhAC3quQ6ODqBqQ4AmdQhjUrXmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775831651; c=relaxed/simple; bh=HTnQae5f5vjE036Y8W6fUf3gq8DJIYh47QxgKOvzmrE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=HJkH+cSAzQ2wF0QBS64xroSljRbNCJYUJ+jZbsAuYYmE8WFyrBJPePCSYnsc/4cJNSPyNUo09VVXdmk0T0Db885PwLqOAGeweKj1xO1Ec8F1ACM1NP3hnkNrIZD57kiJ1B5iu5NLLJ4W4WitTlppO8Q9pJht5K2JyZkmk2P3hjk= 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=SvVN9vgK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=a1ciOxSR; 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="SvVN9vgK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="a1ciOxSR" Date: Fri, 10 Apr 2026 14:33:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775831639; 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=onk3dx2uSLrYmyZSStyotSQylpdOXgf0GULueJgYJ6g=; b=SvVN9vgKritXOzLE5nDp6LTNpvcrsvufh/H2kf4+10NUlkO23foRGon2ZrA387JsPN+8y5 7J0/BfDr/VjZcFw3S9d3mnFBYWP+um8VHQMISvDKjZnUazsIYns2C04CzFT/eN1vEYTNNg zIkbH7yEEkZb46vJBzwaPpY+mLcjoiVFJngPE9oEG+Wy1flVAn0ufY0XpHIFlOcj5Ldamz iLTZqDebZEKPCIvZPY11rtIYMb4k/82bxPu477Id7TpWVqr4+eEnpJakkhK8122tTo0/Ms 6lPJS+fGe8Ed0FeQM1SJQy2+Pc6ilsr123dgEGsmF1dDdEd5tqRfflGgqYf2fw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775831639; 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=onk3dx2uSLrYmyZSStyotSQylpdOXgf0GULueJgYJ6g=; b=a1ciOxSRZ7zZc2cu3BGBkZdovbv2gY6G1hNCVCFRXgd0LX2audGMYLXBX9+bxATrlvdvlr klfrwVd7lTeQyEDA== 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: Clear buddies for preempt_short Cc: Vincent Guittot , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260410132321.2897789-1-vincent.guittot@linaro.org> References: <20260410132321.2897789-1-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: <177583163838.801717.18173795801708799547.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: 78cde54ea5f03398f1cf6656de2472068f6da966 Gitweb: https://git.kernel.org/tip/78cde54ea5f03398f1cf6656de2472068= f6da966 Author: Vincent Guittot AuthorDate: Fri, 10 Apr 2026 15:23:21 +02:00 Committer: Peter Zijlstra CommitterDate: Fri, 10 Apr 2026 16:31:50 +02:00 sched/eevdf: Clear buddies for preempt_short next buddy should not prevent shorter slice preemption. Don't take buddy into account when checking if shorter slice entity can preempt and clear it if the entity with a shorter slice can preempt current. Test on snapdragon rb5: hackbench -T -p -l 16000000 -g 2 1> /dev/null & hackbench runs in cgroup /test-A cyclictest -t 1 -i 2777 -D 63 --policy=3Dfair --mlock -h 20000 -q cyclictest runs in cgroup /test-B tip/sched/core tip/sched/core +this patch cyclictest slice (ms) (default)2.8 8 8 hackbench slice (ms) (default)2.8 20 20 Total Samples | 22679 22595 22686 Average (us) | 84 94(-12%) 59( 37%) Median (P50) (us) | 56 56( 0%) 56( 0%) 90th Percentile (us) | 64 65(- 2%) 63( 3%) 99th Percentile (us) | 1047 1273(-22%) 74( 94%) 99.9th Percentile (us) | 2431 4751(-95%) 663( 86%) Maximum (us) | 4694 8655(-84%) 3934( 55%) Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260410132321.2897789-1-vincent.guittot@lin= aro.org --- 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 12890ef..f179faf 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1116,7 +1116,7 @@ static struct sched_entity *__pick_eevdf(struct cfs_r= q *cfs_rq, bool protect) /* * Picking the ->next buddy will affect latency but not fairness. */ - if (sched_feat(PICK_BUDDY) && + if (sched_feat(PICK_BUDDY) && protect && cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next)) { /* ->next will never be delayed */ WARN_ON_ONCE(cfs_rq->next->sched_delayed); @@ -9138,8 +9138,10 @@ pick: return; =20 preempt: - if (preempt_action =3D=3D PREEMPT_WAKEUP_SHORT) + if (preempt_action =3D=3D PREEMPT_WAKEUP_SHORT) { cancel_protect_slice(se); + clear_buddies(cfs_rq, se); + } =20 resched_curr_lazy(rq); }