* [PATCH sched_ext/for-6.12] sched_ext: Don't trigger ops.quiescent/runnable() on migrations
@ 2024-09-09 23:40 Tejun Heo
2024-09-10 20:44 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2024-09-09 23:40 UTC (permalink / raw)
To: David Vernet
Cc: linux-kernel, kernel-team, hodges.daniel.scott, multics69,
andrea.righi, schatzberg.dan
A task moving across CPUs should not trigger quiescent/runnable task state
events as the task is staying runnable the whole time and just stopping and
then starting on different CPUs. Suppress quiescent/runnable task state
events if task_on_rq_migrating().
Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: David Vernet <void@manifault.com>
Cc: Daniel Hodges <hodges.daniel.scott@gmail.com>
Cc: Changwoo Min <multics69@gmail.com>
Cc: Andrea Righi <andrea.righi@linux.dev>
Cc: Dan Schatzberg <schatzberg.dan@gmail.com>
---
kernel/sched/ext.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -2050,7 +2050,7 @@ static void enqueue_task_scx(struct rq *
rq->scx.nr_running++;
add_nr_running(rq, 1);
- if (SCX_HAS_OP(runnable))
+ if (SCX_HAS_OP(runnable) && !task_on_rq_migrating(p))
SCX_CALL_OP_TASK(SCX_KF_REST, runnable, p, enq_flags);
if (enq_flags & SCX_ENQ_WAKEUP)
@@ -2134,7 +2134,7 @@ static bool dequeue_task_scx(struct rq *
SCX_CALL_OP_TASK(SCX_KF_REST, stopping, p, false);
}
- if (SCX_HAS_OP(quiescent))
+ if (SCX_HAS_OP(quiescent) && !task_on_rq_migrating(p))
SCX_CALL_OP_TASK(SCX_KF_REST, quiescent, p, deq_flags);
if (deq_flags & SCX_DEQ_SLEEP)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH sched_ext/for-6.12] sched_ext: Don't trigger ops.quiescent/runnable() on migrations
2024-09-09 23:40 [PATCH sched_ext/for-6.12] sched_ext: Don't trigger ops.quiescent/runnable() on migrations Tejun Heo
@ 2024-09-10 20:44 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2024-09-10 20:44 UTC (permalink / raw)
To: David Vernet
Cc: linux-kernel, kernel-team, hodges.daniel.scott, multics69,
andrea.righi, schatzberg.dan
On Mon, Sep 09, 2024 at 01:40:44PM -1000, Tejun Heo wrote:
> A task moving across CPUs should not trigger quiescent/runnable task state
> events as the task is staying runnable the whole time and just stopping and
> then starting on different CPUs. Suppress quiescent/runnable task state
> events if task_on_rq_migrating().
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Suggested-by: David Vernet <void@manifault.com>
> Cc: Daniel Hodges <hodges.daniel.scott@gmail.com>
> Cc: Changwoo Min <multics69@gmail.com>
> Cc: Andrea Righi <andrea.righi@linux.dev>
> Cc: Dan Schatzberg <schatzberg.dan@gmail.com>
Applied to sched_ext/for-6.12.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-10 20:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09 23:40 [PATCH sched_ext/for-6.12] sched_ext: Don't trigger ops.quiescent/runnable() on migrations Tejun Heo
2024-09-10 20:44 ` Tejun Heo
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®