linux/Documentation/scheduler
Tejun Heo 5209c03c8e sched_ext: Rename scx_bpf_consume() to scx_bpf_dsq_move_to_local()
In sched_ext API, a repeatedly reported pain point is the overuse of the
verb "dispatch" and confusion around "consume":

- ops.dispatch()
- scx_bpf_dispatch[_vtime]()
- scx_bpf_consume()
- scx_bpf_dispatch[_vtime]_from_dsq*()

This overloading of the term is historical. Originally, there were only
built-in DSQs and moving a task into a DSQ always dispatched it for
execution. Using the verb "dispatch" for the kfuncs to move tasks into these
DSQs made sense.

Later, user DSQs were added and scx_bpf_dispatch[_vtime]() updated to be
able to insert tasks into any DSQ. The only allowed DSQ to DSQ transfer was
from a non-local DSQ to a local DSQ and this operation was named "consume".
This was already confusing as a task could be dispatched to a user DSQ from
ops.enqueue() and then the DSQ would have to be consumed in ops.dispatch().
Later addition of scx_bpf_dispatch_from_dsq*() made the confusion even worse
as "dispatch" in this context meant moving a task to an arbitrary DSQ from a
user DSQ.

Clean up the API with the following renames:

1. scx_bpf_dispatch[_vtime]()		-> scx_bpf_dsq_insert[_vtime]()
2. scx_bpf_consume()			-> scx_bpf_dsq_move_to_local()
3. scx_bpf_dispatch[_vtime]_from_dsq*()	-> scx_bpf_dsq_move[_vtime]*()

This patch performs the second rename. Compatibility is maintained by:

- The previous kfunc names are still provided by the kernel so that old
  binaries can run. Kernel generates a warning when the old names are used.

- compat.bpf.h provides wrappers for the new names which automatically fall
  back to the old names when running on older kernels. They also trigger
  build error if old names are used for new builds.

The compat features will be dropped after v6.15.

v2: Comment and documentation updates.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Andrea Righi <arighi@nvidia.com>
Acked-by: Changwoo Min <changwoo@igalia.com>
Acked-by: Johannes Bechberger <me@mostlynerdless.de>
Acked-by: Giovanni Gherdovich <ggherdovich@suse.com>
Cc: Dan Schatzberg <dschatzberg@meta.com>
Cc: Ming Yang <yougmark94@gmail.com>
2024-11-11 07:06:16 -10:00
..
completion.rst docs: scheduler: completion: Update member of struct completion 2024-09-05 14:17:45 -06:00
index.rst sched_ext: Initial pull request for v6.12 2024-09-21 09:44:57 -07:00
membarrier.rst membarrier: Create Documentation/scheduler/membarrier.rst 2024-02-15 08:04:12 -08:00
sched-arch.rst Documentation: Drop or replace remaining mentions of IA64 2023-09-11 08:13:18 +00:00
sched-bwc.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
sched-capacity.rst sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2023-10-09 12:59:48 +02:00
sched-deadline.rst sched/deadline: Convert schedtool example to chrt 2024-09-11 11:23:56 +02:00
sched-debug.rst sched/numa-balancing: Move some document to make it consistent with the code 2022-02-11 23:30:08 +01:00
sched-design-CFS.rst docs: scheduler: Start documenting the EEVDF scheduler 2024-08-07 13:37:16 -06:00
sched-domains.rst sched/balancing: Rename load_balance() => sched_balance_rq() 2024-03-12 12:00:00 +01:00
sched-eevdf.rst docs: scheduler: Start documenting the EEVDF scheduler 2024-08-07 13:37:16 -06:00
sched-energy.rst sched/topology: Remove the EM_MAX_COMPLEXITY limit 2023-10-09 13:07:27 +02:00
sched-ext.rst sched_ext: Rename scx_bpf_consume() to scx_bpf_dsq_move_to_local() 2024-11-11 07:06:16 -10:00
sched-nice-design.rst Documentation: scheduler: fixed 2 typos in sched-nice-design.rst 2021-05-17 12:42:59 -06:00
sched-pelt.c sched/fair: Fix "runnable_avg_yN_inv" not used warnings 2019-06-17 12:15:58 +02:00
sched-rt-group.rst sched/rt/docs: Use 'real-time' instead of 'realtime' 2023-10-02 15:17:14 +02:00
sched-stats.rst sched/balancing: Rename load_balance() => sched_balance_rq() 2024-03-12 12:00:00 +01:00
sched-util-clamp.rst sched/documentation: Document the util clamp feature 2023-01-05 12:08:34 +01:00
schedutil.rst sched/fair: Remove SCHED_FEAT(UTIL_EST_FASTUP, true) 2023-12-23 15:59:56 +01:00
text_files.rst