Loading kernel/sched/core.c +4 −0 Original line number Diff line number Diff line Loading @@ -783,6 +783,10 @@ static inline void dequeue_task(struct rq *rq, struct task_struct *p, int flags) sched_info_dequeued(rq, p); p->sched_class->dequeue_task(rq, p, flags); #ifdef CONFIG_SCHED_WALT if (p == rq->ed_task) early_detection_notify(rq, ktime_get_ns()); #endif trace_sched_enq_deq_task(p, 0, cpumask_bits(&p->cpus_allowed)[0]); } Loading kernel/sched/walt.c +8 −1 Original line number Diff line number Diff line Loading @@ -313,6 +313,11 @@ void clear_ed_task(struct task_struct *p, struct rq *rq) rq->ed_task = NULL; } static inline bool is_ed_task(struct task_struct *p, u64 wallclock) { return (wallclock - p->last_wake_ts >= EARLY_DETECTION_DURATION); } bool early_detection_notify(struct rq *rq, u64 wallclock) { struct task_struct *p; Loading @@ -327,7 +332,7 @@ bool early_detection_notify(struct rq *rq, u64 wallclock) if (!loop_max) break; if (wallclock - p->last_wake_ts >= EARLY_DETECTION_DURATION) { if (is_ed_task(p, wallclock)) { rq->ed_task = p; return 1; } Loading Loading @@ -828,6 +833,8 @@ void fixup_busy_time(struct task_struct *p, int new_cpu) if (p == src_rq->ed_task) { src_rq->ed_task = NULL; dest_rq->ed_task = p; } else if (is_ed_task(p, wallclock)) { dest_rq->ed_task = p; } done: Loading Loading
kernel/sched/core.c +4 −0 Original line number Diff line number Diff line Loading @@ -783,6 +783,10 @@ static inline void dequeue_task(struct rq *rq, struct task_struct *p, int flags) sched_info_dequeued(rq, p); p->sched_class->dequeue_task(rq, p, flags); #ifdef CONFIG_SCHED_WALT if (p == rq->ed_task) early_detection_notify(rq, ktime_get_ns()); #endif trace_sched_enq_deq_task(p, 0, cpumask_bits(&p->cpus_allowed)[0]); } Loading
kernel/sched/walt.c +8 −1 Original line number Diff line number Diff line Loading @@ -313,6 +313,11 @@ void clear_ed_task(struct task_struct *p, struct rq *rq) rq->ed_task = NULL; } static inline bool is_ed_task(struct task_struct *p, u64 wallclock) { return (wallclock - p->last_wake_ts >= EARLY_DETECTION_DURATION); } bool early_detection_notify(struct rq *rq, u64 wallclock) { struct task_struct *p; Loading @@ -327,7 +332,7 @@ bool early_detection_notify(struct rq *rq, u64 wallclock) if (!loop_max) break; if (wallclock - p->last_wake_ts >= EARLY_DETECTION_DURATION) { if (is_ed_task(p, wallclock)) { rq->ed_task = p; return 1; } Loading Loading @@ -828,6 +833,8 @@ void fixup_busy_time(struct task_struct *p, int new_cpu) if (p == src_rq->ed_task) { src_rq->ed_task = NULL; dest_rq->ed_task = p; } else if (is_ed_task(p, wallclock)) { dest_rq->ed_task = p; } done: Loading