scx-upstream/scheds/include/scx
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
..
common.bpf.h scx_flatcg: Keep cgroup rb nodes stashed 2024-03-11 08:35:25 -07:00
common.h scheds: Rearrange include files to match kernel/tools/sched_ext/include 2023-12-03 12:47:23 -10:00
compat.bpf.h scx: Add compat support for SCX_KICK_IDLE and use it for idle CPU wakeups 2024-02-06 15:28:40 -10:00
ravg_impl.bpf.h scheds: Rearrange include files to match kernel/tools/sched_ext/include 2023-12-03 12:47:23 -10:00
ravg.bpf.h scx_rusty: Fix typos 2024-02-07 23:38:26 -06:00
user_exit_info.h scx: Clean up user_exit_info.h 2024-01-31 10:47:24 -10:00