diff options
author | 2025-04-29 08:40:10 -1000 | |
---|---|---|
committer | 2025-04-29 08:40:10 -1000 | |
commit | 17108735b47d125b7649c9b6d4be94cdffc863b9 (patch) | |
tree | 86af58bd11327ccacb07f9eb3485f29c9af76db3 /scripts/lib/kdoc/kdoc_parser.py | |
parent | sched_ext: Avoid NULL scx_root deref through SCX_HAS_OP() (diff) | |
download | wireguard-linux-17108735b47d125b7649c9b6d4be94cdffc863b9.tar.xz wireguard-linux-17108735b47d125b7649c9b6d4be94cdffc863b9.zip |
sched_ext: Use dynamic allocation for scx_sched
To prepare for supporting multiple schedulers, make scx_sched allocated
dynamically. scx_sched->kobj is now an embedded field and the kobj's
lifetime determines the lifetime of the containing scx_sched.
- Enable path is updated so that kobj init and addition are performed later.
- scx_sched freeing is initiated in scx_kobj_release() and also goes through
an rcu_work so that scx_root can be accessed from an unsynchronized path -
scx_disable().
- sched_ext_ops->priv is added and used to point to scx_sched instance
created for the ops instance. This is used by bpf_scx_unreg() to determine
the scx_sched instance to disable and put.
No behavior changes intended.
v2: Andrea reported kernel oops due to scx_bpf_unreg() trying to deref NULL
scx_root after scheduler init failure. sched_ext_ops->priv added so that
scx_bpf_unreg() can always find the scx_sched instance to unregister
even if it failed early during init.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Acked-by: Changwoo Min <changwoo@igalia.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions