p->scx.flags |= SCX_TASK_RESET_RUNNABLE_AT;
}
- static void enqueue_task_scx(struct rq *rq, struct task_struct *p, int enq_flags)
+ static void enqueue_task_scx(struct rq *rq, struct task_struct *p, int core_enq_flags)
{
- struct scx_sched *sch = scx_root;
+ struct scx_sched *sch = scx_task_sched(p);
int sticky_cpu = p->scx.sticky_cpu;
+ u64 enq_flags = core_enq_flags | rq->scx.extra_enq_flags;
if (enq_flags & ENQUEUE_WAKEUP)
rq->scx.flags |= SCX_RQ_IN_WAKEUP;
- enq_flags |= rq->scx.extra_enq_flags;
- if (sticky_cpu >= 0)
- p->scx.sticky_cpu = -1;
--
/*
* Restoring a running task will be immediately followed by
* set_next_task_scx() which expects the task to not be on the BPF