Re: [PATCH sched_ext/for-6.15 v3 2/5] sched_ext: Declare context-sensitive kfunc groups that can be used by different SCX operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 26, 2025 at 07:28:17PM +0000, Juntong Deng wrote:
> This patch declare context-sensitive kfunc groups that can be used by
             ^
             declares

> different SCX operations.
...
> +/* Each flag corresponds to a btf kfunc id set */
> +enum scx_ops_kf_flags {
> +	SCX_OPS_KF_ANY			= 0,
> +	SCX_OPS_KF_UNLOCKED		= 1 << 1,

nit: Any specific reason to skip bit 0?

> +	SCX_OPS_KF_CPU_RELEASE		= 1 << 2,
> +	SCX_OPS_KF_DISPATCH		= 1 << 3,
> +	SCX_OPS_KF_ENQUEUE		= 1 << 4,
> +	SCX_OPS_KF_SELECT_CPU		= 1 << 5,
> +};
> +
> +static const u32 scx_ops_context_flags[] = {
> +	[SCX_OP_IDX(select_cpu)]		= SCX_OPS_KF_SELECT_CPU | SCX_OPS_KF_ENQUEUE,
> +	[SCX_OP_IDX(enqueue)]			= SCX_OPS_KF_ENQUEUE,
> +	[SCX_OP_IDX(dequeue)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(dispatch)]			= SCX_OPS_KF_DISPATCH | SCX_OPS_KF_ENQUEUE,
> +	[SCX_OP_IDX(tick)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(runnable)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(running)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(stopping)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(quiescent)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(yield)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(core_sched_before)]		= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(set_weight)]		= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(set_cpumask)]		= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(update_idle)]		= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(cpu_acquire)]		= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(cpu_release)]		= SCX_OPS_KF_CPU_RELEASE,
> +	[SCX_OP_IDX(init_task)]			= SCX_OPS_KF_UNLOCKED,
> +	[SCX_OP_IDX(exit_task)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(enable)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(disable)]			= SCX_OPS_KF_ANY,
> +	[SCX_OP_IDX(dump)]			= SCX_OPS_KF_DISPATCH,

Shouldn't this be SCX_OPS_KF_UNLOCKED?

Thanks.

-- 
tejun




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux