Re: [PATCH sched_ext/for-6.11] sched_ext: Reverting @p->sched_class if @p->disallow is set

From: Zhangqiao (2012 lab)
Date: Tue Jul 16 2024 - 07:32:47 EST


hi,

在 2024/7/12 2:57, Tejun Heo 写道:
Hello,

On Thu, Jul 11, 2024 at 07:07:20PM +0800, Zhangqiao (2012 lab) wrote:
...
if (p->policy == SCHED_EXT) {
p->policy = SCHED_NORMAL;
+ p->sched_class = &fair_sched_class;
atomic_long_inc(&scx_nr_rejected);
Did you see any issues with the existing implementation? The policy is set
before the task is attached, so it should work fine. Also, you can't change
sched_class by just assigning to it.

What does "attach" mean? I'm not sure. p->sched_class is assigned in __sched_fork()
which is performed before scx_ops_init_task().


Thanks.