From nobody Sun Feb 8 21:42:02 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 348F1367F4B for ; Fri, 23 Jan 2026 10:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769164147; cv=none; b=rPbbdmhXBPIhmXaSMwN+v1/tq3//j8PwwDrlJ9IrquiNo3bcMq7+S+KYPQRYxp4YRx/MZRrfVJQm92carGtPomlQPTyqnpuJvE7CbpgdNze4gD2gKOV2fviYmyRnigw1ZNdwnnjFHot+fMLIJ1xIXb1mJ8++cEFIFChN3KNkDJU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769164147; c=relaxed/simple; bh=giS0LdOp695L0GEcDEjYM6gSdPPFstISoAdyPRTYldQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hq72iIrbUPneJZ5xbGMxNCsDLbJ4TVsWiHbFu9gSzeDP3x/5RDIZ0LpVWqMsvktpNsoglNy4ZFv5VAhtOQZVQVEbL4zC/QOLx6C1A1AKRtJzAF9NZ8Tdm1do+u9cDY8casR34mqAuLPGHRH1IqbJ1+/7AB5GCL2eX3v1WbQ/t/A= 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=vbkVlBuV; arc=none smtp.client-ip=209.85.128.43 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="vbkVlBuV" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-47d6a1f08bbso9912265e9.2 for ; Fri, 23 Jan 2026 02:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769164143; x=1769768943; 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=yN/8PuKG0fWt8p7ss8kaf86Wi9lXNle9gSJy0rJrLvk=; b=vbkVlBuV3CJYbtnBetIAuU/FaDKXio1qbyBZJs3Pnuak9MqAg1WUyh3mJkUKWP1ON7 jz5rSGoSJJZ4PyrjM7JFlZAqzuQ1Jpm51w5JQNfemc5ZZCRgrtUKRZ36c+lMSlNE4Ws3 LRmlF1IxGmKCf9qzeHbkJLpcd1AiwLFjoBaTea5ssjn1uD2hOcgZn73xHNU9gCoecNvM stFC4KtXs8pDaLslFRV6RZ8FlG1knz3m9clNL0Wl3/IEit3m2c2/tFk9HZO2jyB9hPxs 1kbn8Q7XAzvZ4BIgSHZigodH8sRT0SMoYCt3ECcnm/+lCSNNutH1WhdQvFQZeFpmIxEL lISw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769164143; x=1769768943; 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=yN/8PuKG0fWt8p7ss8kaf86Wi9lXNle9gSJy0rJrLvk=; b=Mj7hq4XcVz1lDbH55mtBOgEiuBrgCAGkHvVWW3HeBwB6e6FEutKyXd+8Ee0Q4QfUqR u4XEgPExyVrtQEYKG8JNYeLrGK46jVzIgw+o4FULgcI+lOILYRXeGa6Y4Orl8b2QYJMS AZFGZ+0/ipmgn2rTMaBo4iezd+nqbWrYvtZN+HAB+ELJ+jn1b+XmFzVnpOIO65+VXDTn YQ8SZBOHcHVUBuiUjwqORpXmVwklE4f07ACBZOU0jzj158obCvQOFY72rfJzeOoVZXS0 BG64hHaAJlchTfc3O7bHBmvNifaOPoMH9j9f4FXKpOOEYggSqRo555T1PDMcZ013x4VW ePhg== X-Forwarded-Encrypted: i=1; AJvYcCXzwMimzOB5DQ6ie7UtpWo4y9/K30Xnv1p3w+BHdddzCDh9XPPZGzC81MhwxGun4mE9v8Ri/5RAp0iXWCk=@vger.kernel.org X-Gm-Message-State: AOJu0YyC9ZoKdiqarR1cbr2MgueP4P3i2NejcspQW3qwuQq1PQZP5odl ho9pAlDXWplsFq3gXFwOIRmroYK+IWDGwKgHQodzjy1vird3+0OaON7pXlXhoDbRoEQ= X-Gm-Gg: AZuq6aKAsW9Mud9imLOZQkaAWpGL/evEG93cXeX2MqLFONzPAdn//fyy1L43iXPkHKe 1T5zRLqxDIa25KONH7lzQelXvCrAMDBfHIeztDay7CC+7gj6RcPEsWOG4C6DGl0AHjbeZra20cy wSKPmDYYhmuOO6ktcCUBrJke1D13JRuh769/nduVsLksk4Dnpx2DJ2NmxaxLEyYMepRiqv8sbq7 mpBzgA8/nbXmcIEFeoOcr9XVliGHSvyAwNfLCtXpXgSyQXSDkXbR7VmJYZnLe6aXEVPpk9OZqcL gR3qTnAu6OwFomqWgpeOFvR04EqfPSQ+eGxZBGI/gNH8iikVsDxRkJgUGMtyCkoQCLkj5q9LGjL 8iBo/5NWib1n+TvbeZqFY7E4CJyYHkBlcdlZBwEXLkaeyhFcoXHZS2xKmPKzAYebTLMeENRl8Fy 6dXWsV2v/CHxJr2MYZdqs= X-Received: by 2002:a05:600c:1552:b0:47e:dc64:f1c6 with SMTP id 5b1f17b1804b1-4804c9456e1mr41322125e9.6.1769164142588; Fri, 23 Jan 2026 02:29:02 -0800 (PST) Received: from vingu-cube.. ([2a01:e0a:f:6020:8cb7:9dda:5fb2:8f97]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4804d8c0aebsm45694485e9.15.2026.01.23.02.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 02:29:01 -0800 (PST) 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, linux-kernel@vger.kernel.org, ryan.roberts@arm.com, mgorman@techsingularity.net, vineethr@linux.ibm.com, clm@meta.com, Christian.Loehle@arm.com Cc: Vincent Guittot Subject: [PATCH] sched/fair: revert force wakeup preemption Date: Fri, 23 Jan 2026 11:28:58 +0100 Message-ID: <20260123102858.52428-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" This agressively bypasses run_to_parity and slice protection with the assumpiton that this is what waker wants but there is no garantee that the wakee will be the next to run. It is a better choice to use yield_to_task or WF_SYNC in such case. This increases the number of resched and preemption because a task becomes quickly "ineligible" when it runs; We update the task vruntime periodically and before the task exhausted its slice or at least quantum. Example: 2 tasks A and B wake up simultaneously with lag =3D 0. Both are eligible. Task A runs 1st and wakes up task C. Scheduler updates task A's vruntime which becomes greater than average runtime as all others have a lag =3D=3D 0 and didn't run yet. Now task A is ineligible because it received more runtime than the other task but it has not yet exhausted its slice nor a min quantum. We force preemption, disable protection but Task B will run 1st not task C. Sidenote, DELAY_ZERO increases this effect by clearing positive lag at wake up. Fixes: e837456fdca8 ("sched/fair: Reimplement NEXT_BUDDY to align with EEVD= F goals") Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 04993c763a06..16ecc3475fe2 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8822,16 +8822,6 @@ static void wakeup_preempt_fair(struct rq *rq, struc= t task_struct *p, int wake_f if ((wake_flags & WF_FORK) || pse->sched_delayed) return; =20 - /* - * If @p potentially is completing work required by current then - * consider preemption. - * - * Reschedule if waker is no longer eligible. */ - if (in_task() && !entity_eligible(cfs_rq, se)) { - preempt_action =3D PREEMPT_WAKEUP_RESCHED; - goto preempt; - } - /* Prefer picking wakee soon if appropriate. */ if (sched_feat(NEXT_BUDDY) && set_preempt_buddy(cfs_rq, wake_flags, pse, se)) { --=20 2.43.0