From nobody Tue Jun 16 19:36:08 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3F4F35B136 for ; Wed, 29 Apr 2026 16:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777480877; cv=none; b=jy3LQuyL3QGllnx9uGakPJYo452Z6kqvqyxHCU1cXOFMxj05UD6soRw75deWtN4A68Cl3kl1gzZOLwHXGDmz5dfk3Dcg4tHZK/p7YSaEKo5YRcOPisifEu7xYy7ehZhTtMw9LNx2y+YMYeUWu0rJPb8Zrz6oJit6pC/liC17W84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777480877; c=relaxed/simple; bh=kTagfq95j96Tkogxkb6WUex3fjLILCQHQJxseIA7rMU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EOeBuUN+D8Peup3rDRYe3j+vIKvRubSIzIYfSVnAzEFI8DwJgJz5su8wrEd3x2vuwP12BgVtEZu/fwspb9T5Hcp5cjJy3zyuslkgxbbxx+8kCSLfZRsmAYOmfjXLx9aSReMOZGAFcGS7kK2NscY1wY4RDHXtfZAxj/BlepFxLvQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zDNh44PI; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zDNh44PI" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso99622055e9.2 for ; Wed, 29 Apr 2026 09:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777480874; x=1778085674; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=blKh80HuB0RpqfeJbyDf2I+nJp19l5lSIDhZKP4F/Gs=; b=zDNh44PIR1YpKncqp751Pw3U4aSR+boLD3QmTNETQRPVV/XYeJpq4Zb5Ht4y+ebY7O XieuGAJH5oTJMK4/uQaVbomnRkPgp48UYODWOVOqYQUDf3JQFavL/eVc5oQ3GRu5Q7t2 +Qn6Ya9BEkJxs6I4i8AKgbUF/JmfX77ZW95/KGCwniC9QmlY/ttS7r9+evDH4PPHwyB8 OR547dNfnNZgVjIu0pom7xAlia5pxJqaklJsznMGNcRxIpM3EtWvvbrTH03JJqGoqNwo TAb1TXK2SDAtKEOSGKmFaLuM6pA3T203JqwZ0rAhwlWSycoMnOJJg9g7D851pvAZMuK1 J6lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777480874; x=1778085674; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=blKh80HuB0RpqfeJbyDf2I+nJp19l5lSIDhZKP4F/Gs=; b=d5wzTgaDPpV3Xnmu/gaLeSh6t92fX4Ruwx/NhJ90bulJXL2tNbh8d9JrgUPd37ivda Kddy4OXCUiN2iLUi1Z9P4VLGkWlWIkjv3Hpfpc6gzBBMEe60WVQf00/gUKqHmKJEKIhV eu3c0vYFRncobLaHN8Ip1zMII6PZvrXDdNHLMWT7ZWjkjguYTET2vzIER5HoV2oXGtKo mPY2i4O1E50YFdtOVS0LHCHu+UPsIKWHz48buq9+BdwmNFqan5f3OPuR1fyGigZlzskL uHm4jViyORPlJ+C8SbP1vbnHRAfIJAhZH8L0ya9t5MbPlArn4XzeF9F5M3lq4nVL0W9E AEkA== X-Forwarded-Encrypted: i=1; AFNElJ+r/EJbget7W1udl9YwuU/uOU1SY34LCY7TDJ5VlS+QGHRf7Ihh3vJl+2lNHkVIMh0ZL5JMqzegITOi9oo=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/izgyfZRlF6PrEVs48DaWMwVjX/movPRp+mKB6CfYPhufhAue Na3qy8+RJUfa/WIiHyTuuVDKXgZ6kEpzu4eHAFMEu6hgCMD861eNM6eTKZQijd7fhXM= X-Gm-Gg: AeBDiesOpxiqfwb+01v9QBWrAsdJ7u7IvPvNrg1n2eojYisj6ObChVj5oAhI1beAT+5 f7elCgTKG6rkj8/GJHFYD35U3O43KL5IuGg1cmnguNFGpK6oX6oBMyo5oSwfAwAMolx3U4HJtnh psYj0WWST1BRBYCWOvUYIPg2TENAI6wW447X8PsLkoI10rHy62JkUH4Q9nWn0JhLgZtfaWs/0Sz VDyWWK65yR6goNq7DNjl9dSwN92yNKoS6Lm7diy6/Qxz34dugpCodG3ELG5OY+GmX4jmX74kIb3 8Wv5y7XqoEYOoV9r461evpvO89Hs4S5qLBXRq0y7hU5s5IazQILHPpyggwSkMMdf+lqFFkbWOh2 9fg11qjpLC6/1UPXtqdxNWpwolTB0rAUBwfQUU2cK9XEL/URyB8VfhaHDxtIZi092UY1ToTSDii YihLY81GQJhvVcITXBtoNG80K85EMy3vGfddsKQnhXJy2rwheH3Q== X-Received: by 2002:a05:600c:3b13:b0:488:9e43:9690 with SMTP id 5b1f17b1804b1-48a77afd324mr136230315e9.10.1777480874091; Wed, 29 Apr 2026 09:41:14 -0700 (PDT) Received: from vingu-cube.. ([2a01:e0a:f:6020:db4b:3:c0cd:624d]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a820c865esm3188675e9.5.2026.04.29.09.41.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 09:41:13 -0700 (PDT) From: Vincent Guittot To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org, qyousef@layalina.io Cc: Vincent Guittot Subject: [PATCH] sched/fair: Fix wakeup_preempt_fair for not waking up task Date: Wed, 29 Apr 2026 18:41:02 +0200 Message-ID: <20260429164102.1388139-1-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.43.0 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 Content-Type: text/plain; charset="utf-8" The assumption that p is always enqueued and not delayed, is only true for wakeup. If p was moved while sched_delayed, pick_next_entity will dequeue it during the attach and the cfs might become empty. Fixes: ac8e69e69363 ("sched/fair: Fix wakeup_preempt_fair() vs delayed dequ= eue") Signed-off-by: Vincent Guittot --- I have triggered this while running my latency stress test on a new platfor= m. kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 728965851842..99fb524c4922 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9147,7 +9147,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct= task_struct *p, int wake_f * Because p is enqueued, nse being null can only mean that we * dequeued a delayed task. */ - if (!nse) + if (!nse && (wake_flags & WF_TTWU)) goto pick; =20 if (sched_feat(RUN_TO_PARITY)) --=20 2.43.0