• Yafang Shao's avatar
    cgroup: Add a new helper for cgroup1 hierarchy · aecd408b
    Yafang Shao authored
    A new helper is added for cgroup1 hierarchy:
    
    - task_get_cgroup1
      Acquires the associated cgroup of a task within a specific cgroup1
      hierarchy. The cgroup1 hierarchy is identified by its hierarchy ID.
    
    This helper function is added to facilitate the tracing of tasks within
    a particular container or cgroup dir in BPF programs. It's important to
    note that this helper is designed specifically for cgroup1 only.
    
    tj: Use irsqsave/restore as suggested by Hou Tao <houtao@huaweicloud.com>.
    Suggested-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
    Cc: Hou Tao <houtao@huaweicloud.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    aecd408b
cgroup-internal.h 8.85 KB