Re: [PATCH 3/4] sched_ext: Wrap kfunc args in struct to prepare for aux__prog
From: Tejun Heo
Date: Tue Oct 07 2025 - 14:24:03 EST
Hello,
On Tue, Oct 07, 2025 at 11:48:44AM +0200, Andrea Righi wrote:
> > +struct scx_bpf_dsq_insert_vtime_args {
> > + /* @p can't be packed together as KF_RCU is not transitive */
> > + u64 dsq_id;
> > + u64 slice;
> > + u64 vtime;
> > + u64 enq_flags;
> > +};
>
> With PATCH 2/4 introducing scx_bpf_task_set_slice() and
> scx_bpf_task_set_dsq_vtime(), would it be reasonable to use those to set
> these task properties and then completely get rid of these args in
> scx_bpf_dsq_insert[_vtime]()?
Maybe. However, the most common usage pattern is setting vtime and slice on
insertion, so I think it makes sense to have a shortcut interface for that.
Even if the overhead difference is negligible, it's nice to have a dedicated
interface for the most common use case.
Thanks.
--
tejun