Re: [PATCH 2/4] sched_ext: Add scx_bpf_task_set_slice() and scx_bpf_task_set_dsq_vtime()
From: Tejun Heo
Date: Tue Oct 07 2025 - 14:11:05 EST
On Wed, Oct 08, 2025 at 01:28:31AM +0900, Changwoo Min wrote:
>
> On 10/7/25 10:51, Tejun Heo wrote:
> > With the planned hierarchical scheduler support, sub-schedulers will need to
> > be verified for authority before being allowed to modify task->scx.slice and
> > task->scx.dsq_vtime. Add scx_bpf_task_set_slice() and
> > scx_bpf_task_set_dsq_vtime() which will perform the necessary permission
> > checks.
>
> Is it necessary to distinguish between decreasing the slice and
> increasing the slice? A BPF scheduler (e.g., LAVD) sets the slice to
> zero for passive preemption.
It's going to be a simple "does this scheduler own this task?" test, I don't
think it needs to look at how the value is being changed.
Thanks.
--
tejun