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:09:30 EST


On Tue, Oct 07, 2025 at 11:34:56AM +0200, Andrea Righi wrote:
> Hi Tejun,
>
> On Mon, Oct 06, 2025 at 03:51:45PM -1000, 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.
> >
> > Root schedulers can still directly write to these fields, so this doesn't
> > affect existing schedulers.
> >
> > Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> > ---
>
> Maybe provide __COMPAT_scx_bpf_task_set_slice() and
> __COMPAT_scx_bpf_task_set_dsq_vtime(), but we can do this later.

Ah, right. Will do.

Thanks.

--
tejun