Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON

With commit 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct
dispatches"), scx_bpf_dsq_insert() can use SCX_DSQ_LOCAL_ON for direct
dispatch from ops.enqueue() to target the local DSQ of any CPU.

Update the documentation accordingly.

Fixes: 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Andrea Righi and committed by
Tejun Heo
e4975ac5 d9071ecb

+4 -6
+3 -3
Documentation/scheduler/sched-ext.rst
··· 242 242 task was inserted directly from ``ops.select_cpu()``). ``ops.enqueue()`` 243 243 can make one of the following decisions: 244 244 245 - * Immediately insert the task into either the global or local DSQ by 246 - calling ``scx_bpf_dsq_insert()`` with ``SCX_DSQ_GLOBAL`` or 247 - ``SCX_DSQ_LOCAL``, respectively. 245 + * Immediately insert the task into either the global or a local DSQ by 246 + calling ``scx_bpf_dsq_insert()`` with one of the following options: 247 + ``SCX_DSQ_GLOBAL``, ``SCX_DSQ_LOCAL``, or ``SCX_DSQ_LOCAL_ON | cpu``. 248 248 249 249 * Immediately insert the task into a custom DSQ by calling 250 250 ``scx_bpf_dsq_insert()`` with a DSQ ID which is smaller than 2^63.
+1 -3
kernel/sched/ext.c
··· 6406 6406 * ops.select_cpu(), and ops.dispatch(). 6407 6407 * 6408 6408 * When called from ops.select_cpu() or ops.enqueue(), it's for direct dispatch 6409 - * and @p must match the task being enqueued. Also, %SCX_DSQ_LOCAL_ON can't be 6410 - * used to target the local DSQ of a CPU other than the enqueueing one. Use 6411 - * ops.select_cpu() to be on the target CPU in the first place. 6409 + * and @p must match the task being enqueued. 6412 6410 * 6413 6411 * When called from ops.select_cpu(), @enq_flags and @dsp_id are stored, and @p 6414 6412 * will be directly inserted into the corresponding dispatch queue after