scx-upstream/scheds/include
Dave Marchevsky 3b7f33ea1b scx_flatcg: Keep cgroup rb nodes stashed
The flatcg scheduler uses a rb_node type - struct cgv_node - to keep
track of vtime. On cgroup init, a cgv_node is created and stashed in a
hashmap - cgv_node_stash - for later use. In cgroup_enqueued and
try_pick_next_cgroup, the node is inserted into the rbtree, which
required removing it from the stash before this patch's changes.

This patch makes cgv_node refcounted, which allows keeping it in the
stash for the entirety of the cgroup's lifetime. Unnecessary
bpf_kptr_xchg's and other boilerplate can be removed as a result.

Note that in addition to bpf_refcount patches, which have been upstream
for quite some time, this change depends on a more recent series [0].

  [0]: https://lore.kernel.org/bpf/20231107085639.3016113-1-davemarchevsky@fb.com/

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
2024-03-11 08:35:25 -07:00
..
bpf-compat/gnu build: Add dummy gnu/stubs.h to fix build on systems without 32bit glibc-dev 2023-12-02 13:25:02 -10:00
scx scx_flatcg: Keep cgroup rb nodes stashed 2024-03-11 08:35:25 -07:00
vmlinux scx: Update vmlinux.h to receive SCX_KICK_IDLE 2024-02-06 15:02:01 -10:00