cgroup-v2: Dump cgroup controllers of every threads in a process

Currently, we assume all threads in process are in the same cgroup controllers.
However, with threaded controllers, threads in a process may be in different
controllers. So we need to dump cgroup controllers of every threads in process
and fixup the procfs cgroup parsing to parse from self/task/<tid>/cgroup.

Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
This commit is contained in:
Bui Quang Minh 2022-09-04 15:31:13 +07:00 committed by Andrei Vagin
parent ad3936e81e
commit 17d1d8810e
10 changed files with 98 additions and 20 deletions

View file

@ -24,6 +24,7 @@ message cgroup_dir_entry {
message cg_controller_entry {
repeated string cnames = 1;
repeated cgroup_dir_entry dirs = 2;
required bool is_threaded = 3;
}
message cg_member_entry {

View file

@ -105,6 +105,7 @@ message thread_core_entry {
optional string comm = 13;
optional uint64 blk_sigset_extended = 14;
optional rseq_entry rseq_entry = 15;
required uint32 cg_set = 16;
}
message task_rlimits_entry {