diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-11-18 02:19:37 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-05-12 12:43:28 +0300 |
commit | 539f65125d20aacab54d02d77f10a839f45b09dc (patch) | |
tree | fd42e9555e674cf8987bce6eee17a25371df2ef8 /kernel/sched/sched.h | |
parent | 8a311c740b53324ec584e0e3bb7077d56b123c28 (diff) | |
download | linux-539f65125d20aacab54d02d77f10a839f45b09dc.tar.xz |
sched: Add core wide task selection and scheduling
Instead of only selecting a local task, select a task for all SMT
siblings for every reschedule on the core (irrespective which logical
CPU does the reschedule).
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Don Hiatt <dhiatt@digitalocean.com>
Tested-by: Hongyu Ning <hongyu.ning@linux.intel.com>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20210422123308.557559654@infradead.org
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index e43a2176d88f..dd44a3127e9c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1079,11 +1079,16 @@ struct rq { #ifdef CONFIG_SCHED_CORE /* per rq */ struct rq *core; + struct task_struct *core_pick; unsigned int core_enabled; + unsigned int core_sched_seq; struct rb_root core_tree; + unsigned char core_forceidle; /* shared state */ unsigned int core_task_seq; + unsigned int core_pick_seq; + unsigned long core_cookie; #endif }; @@ -2060,7 +2065,6 @@ static inline void put_prev_task(struct rq *rq, struct task_struct *prev) static inline void set_next_task(struct rq *rq, struct task_struct *next) { - WARN_ON_ONCE(rq->curr != next); next->sched_class->set_next_task(rq, next, false); } |