Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

scx_flatcg: Keep cgroup rb nodes stashed #168

Merged
merged 1 commit into from
Mar 28, 2024
Merged

scx_flatcg: Keep cgroup rb nodes stashed #168

merged 1 commit into from
Mar 28, 2024

Commits on Mar 28, 2024

  1. 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/[email protected]/
    
    Signed-off-by: Dave Marchevsky <[email protected]>
    davemarchevsky authored and htejun committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    79f18e5 View commit details
    Browse the repository at this point in the history