Re: [PATCH sched_ext/for-6.11] sched_ext: Documentation: Remove mentions of scx_bpf_switch_all

From: Tejun Heo
Date: Mon Jul 01 2024 - 13:53:40 EST


Hello,

On Mon, Jul 01, 2024 at 06:00:22PM +0530, Aboorva Devarajan wrote:
...
> +sched_ext is used only when the BPF scheduler is loaded and running. To use
> +sched_ext, a task can invoke ``sched_setscheduler`` with the ``SCHED_EXT``
> +policy constant.

I wonder whether the last sentence is a bit confusing given that tasks can
be on SCX without setting SCHED_EXT.

> +When the BPF scheduler is not loaded, tasks with the ``SCHED_EXT`` policy are
> +treated as ``SCHED_NORMAL`` and scheduled by CFS. ``SCHED_NORMAL`` tasks
> +continue to be scheduled by CFS.
> +
> +When the BPF scheduler is loaded, all tasks with the ``SCHED_EXT`` policy are
> +switched to sched_ext. By default, if the ``struct ops->flag`` is not set to
> +``SCX_OPS_SWITCH_PARTIAL``, ``SCHED_EXT``, ``SCHED_NORMAL``, and lower class
> +tasks are scheduled by sched_ext. In this case, all ``SCHED_NORMAL``,
> +``SCHED_BATCH``, ``SCHED_IDLE``, and ``SCHED_EXT`` tasks are scheduled by
> +sched_ext.

How about something like:

When the BPF scheduler is loaded and ``SCX_OPS_SWITCH_PARTIAL`` is not set
in ops->flags, all ``SCHED_NORMAL``, ``SCHED_BATCH``, ``SCHED_IDLE``, and
``SCHED_EXT`` tasks are scheduled by sched_ext.

> +However, if the ``struct ops->flag`` is set to``SCX_OPS_SWITCH_PARTIAL``,
> +only tasks with the policy set to ``SCHED_EXT`` are scheduled by sched_ext.

And update this paragraph in a similar fashion?

Thanks.

--
tejun