* [PATCH] sched/fair: Always clear se->exec_start when migrated
@ 2026-11-20 9:58 Vincent Guittot
2026-11-20 10:27 ` Kayra Cizmeci
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Guittot @ 2026-11-20 9:58 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
mgorman, vschneid, kprateek.nayak, linux-kernel
Cc: Vincent Guittot
Make sure that se->exec_start is always cleared when task migrates even
when migrating on a throttled cfs.
And remove useless clear of group_entities which can't migrate
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
kernel/sched/fair.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 942140247f76..4e2674bc5c32 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6555,10 +6555,6 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
account_entity_enqueue(cfs_rq, se);
- /* Entity has migrated, no longer consider this task hot */
- if (flags & ENQUEUE_MIGRATED)
- se->exec_start = 0;
-
check_schedstat_required();
update_stats_enqueue_fair(cfs_rq, se, flags);
se->on_rq = 1;
@@ -8214,6 +8210,10 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
unsigned long weight;
bool curr;
+ /* Always clear exec_start when task migrated even for throttled one */
+ if (flags & ENQUEUE_MIGRATED)
+ se->exec_start = 0;
+
if (task_is_throttled(p) && enqueue_throttled_task(p))
return;
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/fair: Always clear se->exec_start when migrated
2026-11-20 9:58 [PATCH] sched/fair: Always clear se->exec_start when migrated Vincent Guittot
@ 2026-11-20 10:27 ` Kayra Cizmeci
0 siblings, 0 replies; 2+ messages in thread
From: Kayra Cizmeci @ 2026-11-20 10:27 UTC (permalink / raw)
To: Vincent Guittot
Cc: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
mgorman, vschneid, kprateek.nayak, linux-kernel
Hi Vincent!
On Fri, Nov 20, 2026 at 10:58:19AM +0100, Vincent Guittot wrote:
> Make sure that se->exec_start is always cleared when task migrates even
> when migrating on a throttled cfs.
Don't this needs a Fixes tag?
>
> And remove useless clear of group_entities which can't migrate
Also wouldn't it would be better to specify a path on the commit message
that se->exec_start doesn't gets cleared and that causes problems?
My brain is not working with 5 hours of sleep :/.
Sorry for my english.
Cheers,
Kayra
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-20 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20 9:58 [PATCH] sched/fair: Always clear se->exec_start when migrated Vincent Guittot
2026-11-20 10:27 ` Kayra Cizmeci
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®