The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON
@ 2025-01-06 17:03 Andrea Righi
  2025-01-06 18:56 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Righi @ 2025-01-06 17:03 UTC (permalink / raw)
  To: Tejun Heo, David Vernet, Changwoo Min
  Cc: Jonathan Corbet, linux-doc, linux-kernel

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>
---
 Documentation/scheduler/sched-ext.rst | 6 +++---
 kernel/sched/ext.c                    | 4 +---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/Documentation/scheduler/sched-ext.rst b/Documentation/scheduler/sched-ext.rst
index 6cb8b676ce03..a8ceaad63b6a 100644
--- a/Documentation/scheduler/sched-ext.rst
+++ b/Documentation/scheduler/sched-ext.rst
@@ -242,9 +242,9 @@ The following briefly shows how a waking task is scheduled and executed.
    task was inserted directly from ``ops.select_cpu()``). ``ops.enqueue()``
    can make one of the following decisions:
 
-   * Immediately insert the task into either the global or local DSQ by
-     calling ``scx_bpf_dsq_insert()`` with ``SCX_DSQ_GLOBAL`` or
-     ``SCX_DSQ_LOCAL``, respectively.
+   * Immediately insert the task into either the global or a local DSQ by
+     calling ``scx_bpf_dsq_insert()`` with one of the following options:
+     ``SCX_DSQ_GLOBAL``, ``SCX_DSQ_LOCAL``, or ``SCX_DSQ_LOCAL_ON | cpu``.
 
    * Immediately insert the task into a custom DSQ by calling
      ``scx_bpf_dsq_insert()`` with a DSQ ID which is smaller than 2^63.
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 010ce7680bbc..c9f2fbb477ed 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -6406,9 +6406,7 @@ __bpf_kfunc_start_defs();
  * ops.select_cpu(), and ops.dispatch().
  *
  * When called from ops.select_cpu() or ops.enqueue(), it's for direct dispatch
- * and @p must match the task being enqueued. Also, %SCX_DSQ_LOCAL_ON can't be
- * used to target the local DSQ of a CPU other than the enqueueing one. Use
- * ops.select_cpu() to be on the target CPU in the first place.
+ * and @p must match the task being enqueued.
  *
  * When called from ops.select_cpu(), @enq_flags and @dsp_id are stored, and @p
  * will be directly inserted into the corresponding dispatch queue after
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON
  2025-01-06 17:03 [PATCH] sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON Andrea Righi
@ 2025-01-06 18:56 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2025-01-06 18:56 UTC (permalink / raw)
  To: Andrea Righi
  Cc: David Vernet, Changwoo Min, Jonathan Corbet, linux-doc,
	linux-kernel

On Mon, Jan 06, 2025 at 06:03:09PM +0100, Andrea Righi wrote:
> 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>

Applied to sched_ext/for-6.14.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-06 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 17:03 [PATCH] sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON Andrea Righi
2025-01-06 18:56 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox