From: "tip-bot2 for Andrea Righi" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Andrea Righi <arighi@nvidia.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/core: Mark wakeups completed through ttwu_runnable()
Date: Mon, 28 Sep 2026 07:01:37 -0000 [thread overview]
Message-ID: <179057889770.3910103.7688900958947733764.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260922165445.943315-4-arighi@nvidia.com>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: a49653d0abebee32bf3ecf650fae9f9dd8298135
Gitweb: https://git.kernel.org/tip/a49653d0abebee32bf3ecf650fae9f9dd8298135
Author: Andrea Righi <arighi@nvidia.com>
AuthorDate: Tue, 22 Sep 2026 18:51:42 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 28 Sep 2026 08:44:39 +02:00
sched/core: Mark wakeups completed through ttwu_runnable()
ttwu_runnable() completes a wakeup for a task which remains queued
without calling activate_task() or its scheduling-class enqueue
callback. Scheduling classes currently cannot distinguish this path
from wakeups which performed a full activation.
Add WF_TTWU_RQ to identify wakeups completed through ttwu_runnable().
A later sched_ext change uses it to reconsider retained proxy donors
which wake without another ops.enqueue() call.
No functional change.
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260922165445.943315-4-arighi@nvidia.com
---
kernel/sched/core.c | 2 +-
kernel/sched/sched.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 07cc171..6b42f91 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3919,7 +3919,7 @@ static int ttwu_runnable(struct task_struct *p, int wake_flags)
* When on_rq && !on_cpu the task is preempted, see if
* it should preempt the task that is current now.
*/
- wakeup_preempt(rq, p, wake_flags);
+ wakeup_preempt(rq, p, wake_flags | WF_TTWU_RQ);
}
ttwu_do_wakeup(p);
return 1;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index b98084e..a0f391f 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2545,6 +2545,7 @@ static inline int task_on_rq_migrating(struct task_struct *p)
#define WF_MIGRATED 0x20 /* Internal use, task got migrated */
#define WF_CURRENT_CPU 0x40 /* Prefer to move the wakee to the current CPU. */
#define WF_RQ_SELECTED 0x80 /* ->select_task_rq() was called */
+#define WF_TTWU_RQ 0x100 /* Wakeup completed through ttwu_runnable() */
static_assert(WF_EXEC == SD_BALANCE_EXEC);
static_assert(WF_FORK == SD_BALANCE_FORK);
next prev parent reply other threads:[~2026-09-28 7:01 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 16:51 [PATCHSET v14 sched_ext/for-7.4] sched: Make proxy execution compatible with sched_ext Andrea Righi
2026-09-22 16:51 ` [PATCH 01/16] sched/core: Drop mutex locks before proxy rescheduling Andrea Righi
2026-09-28 7:01 ` [tip: sched/core] " tip-bot2 for Andrea Righi
2026-09-22 16:51 ` [PATCH 02/16] sched/core: Dequeue waking proxy donors before reset Andrea Righi
2026-09-28 7:01 ` [tip: sched/core] " tip-bot2 for Andrea Righi
2026-09-22 16:51 ` [PATCH 03/16] sched/core: Mark wakeups completed through ttwu_runnable() Andrea Righi
2026-09-28 7:01 ` tip-bot2 for Andrea Righi [this message]
2026-09-22 16:51 ` [PATCH 04/16] sched: Add helper to block retained proxy donors Andrea Righi
2026-09-28 7:01 ` [tip: sched/core] " tip-bot2 for Andrea Righi
2026-09-22 16:51 ` [PATCH 05/16] sched: Add sched_ext hooks for proxy execution Andrea Righi
2026-09-24 7:51 ` Peter Zijlstra
2026-09-25 8:23 ` Andrea Righi
2026-09-28 7:01 ` [tip: sched/core] " tip-bot2 for Andrea Righi
2026-09-22 16:51 ` [PATCH 06/16] sched_ext: Block proxy donors before taking control Andrea Righi
2026-09-22 16:51 ` [PATCH 07/16] sched_ext: Fix ops.running/stopping() pairing for proxy-exec donors Andrea Righi
2026-09-22 16:51 ` [PATCH 08/16] sched_ext: Move reject DSQ draining into core Andrea Righi
2026-09-22 16:51 ` [PATCH 09/16] sched_ext: Generalize the reject DSQ reenqueue path Andrea Righi
2026-09-22 16:51 ` [PATCH 10/16] sched_ext: Handle proxy-exec races in remote DSQ transfers Andrea Righi
2026-09-22 16:51 ` [PATCH 11/16] sched_ext: Split curr|donor references properly Andrea Righi
2026-09-22 16:51 ` [PATCH 12/16] sched_ext: Track proxy execution for NOHZ_FULL Andrea Righi
2026-09-22 16:51 ` [PATCH 13/16] sched_ext: Delegate proxy donor admission to BPF schedulers Andrea Righi
2026-09-22 16:51 ` [PATCH 14/16] sched_ext: Add selftest for blocked donor admission Andrea Righi
2026-09-22 16:51 ` [PATCH 15/16] sched_ext: scx_qmap: Add proxy execution support Andrea Righi
2026-09-22 16:51 ` [PATCH 16/16] sched: Allow enabling proxy exec with sched_ext Andrea Righi
2026-09-24 7:52 ` [PATCHSET v14 sched_ext/for-7.4] sched: Make proxy execution compatible " Peter Zijlstra
2026-09-24 7:59 ` Peter Zijlstra
2026-09-24 8:10 ` K Prateek Nayak
2026-09-24 9:09 ` Peter Zijlstra
2026-09-25 7:46 ` Andrea Righi
2026-09-25 7:56 ` Peter Zijlstra
2026-09-26 19:17 ` Tejun Heo
2026-09-28 19:53 ` Tejun Heo
2026-09-28 20:47 ` Andrea Righi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179057889770.3910103.7688900958947733764.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=arighi@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®