From nobody Sun May 24 18:41:29 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 48BCA35675E for ; Fri, 22 May 2026 12:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779454752; cv=none; b=hZasG4llAXttmQM7mSnRmsr1irStq2SxM4UiTrUfgc40zsCrtBKRv7kKIXClf4UrZTSvS6qwnwnrhvxqD9Jdw1eEmi5sNnGjtFGtqiOULHDTqAWQowz4LjNhjy+poSDucozxq61jvG3xS9vJLzRd9BLBgcywR8DS9zVMKNr/lMU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779454752; c=relaxed/simple; bh=93NcmHaNB8DUe0fc0bvScVLIyyYOHJ+gzV9NFx58akc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EzopC0qd8qJ3m7htKbg/y5thq1Ap3B4QOaFPBpOTJM9Sc57X629HwRzyOkP4hLBmJ3bRU0V2BSLMFaR4L/wgr0s4YuC5Vc3DUa71nZiIVGAYt9aE8ktlediwaZVwOxy/09IxpoP/5/cSF83DcaTTHI5QRHx7YF2Vd08Xew938dc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PYHNeuz0; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PYHNeuz0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779454750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1oIEoosbGpXK8bpJ8MFKkz7HEla3otFxdOgc8W3gdvY=; b=PYHNeuz0Yve6b99FN+p7sTlgEv6wWxTinS4DWCZO5YgM2vFdtIssXyRuwrUYu6DwI4BdxD vzipvDPOjB9ojcvQG9PZCjcuqbXpYNekZTKqQMH5OcOI6LSLtPqrDfuE7CBjKLy2b2gGMm mD2LaV9S9ymqx7UFxL+TGjYCivDbpmA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-PA2ve-CqNcCHVcyQ1uN_UQ-1; Fri, 22 May 2026 08:59:07 -0400 X-MC-Unique: PA2ve-CqNcCHVcyQ1uN_UQ-1 X-Mimecast-MFC-AGG-ID: PA2ve-CqNcCHVcyQ1uN_UQ_1779454745 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6550C195609F; Fri, 22 May 2026 12:59:05 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.rmtit.csb (unknown [10.44.32.55]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D5EEF18004A3; Fri, 22 May 2026 12:59:00 +0000 (UTC) From: Gabriele Monaco To: Juri Lelli , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: jstultz@google.com, arighi@nvidia.com, soolaugust@gmail.com, suzhidao@xiaomi.com, Gabriele Monaco Subject: [PATCH] sched/deadline: Use revised wakeup rule only for running dl_server Date: Fri, 22 May 2026 14:58:33 +0200 Message-ID: <20260522125833.264145-1-gmonaco@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Commit 14a857056466 ("sched/deadline: Use revised wakeup rule for dl_server") applies the revised wakeup rule to any server, as a result servers that are not running (dl_defer_running =3D=3D 0) and start with a deadline overflow get enqueued and can boost tasks as if they were running, invalidating the defer rule and the documented state model. Apply the revised wakeup rule only for deferrable servers that are marked as running. Fixes: 14a857056466 ("sched/deadline: Use revised wakeup rule for dl_server= ") Signed-off-by: Gabriele Monaco Tested-by: Andrea Righi --- Tested with ksched_football on a 16 CPUs machine: no regression (1s for check in and game over in 10s). Apparently the rt_stall sched_ext selftest does fail with tasks not always getting above 4% (almost always above 3%). But that seems to be the case also before this change on that machine. --- kernel/sched/deadline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 7db4c87df83b..e5a7701a8af7 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1017,7 +1017,8 @@ static void update_dl_entity(struct sched_dl_entity *= dl_se) if (dl_time_before(dl_se->deadline, rq_clock(rq)) || dl_entity_overflow(dl_se, rq_clock(rq))) { =20 - if (unlikely((!dl_is_implicit(dl_se) || dl_se->dl_defer) && + if (unlikely((!dl_is_implicit(dl_se) || + (dl_se->dl_defer && dl_se->dl_defer_running)) && !dl_time_before(dl_se->deadline, rq_clock(rq)) && !is_dl_boosted(dl_se))) { update_dl_revised_wakeup(dl_se, rq); base-commit: 8bc67e4db64aa72732c474b44ea8622062c903f0 --=20 2.54.0