diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2023-12-21 19:17:39 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-01-03 21:08:25 -0800 |
commit | 9fc8e802048ad150e8032c4f3dbf40112160cfe9 (patch) | |
tree | a77e0d24b1ba2a4d53645bbed8a724e7f6145c45 /include | |
parent | 9beda16c257d55213f70adee2f16d7f13a8502e1 (diff) |
bpf: Add objcg to bpf_mem_alloc
The objcg is a bpf_mem_alloc level property since all bpf_mem_cache's
are with the same objcg. This patch made such a property explicit.
The next patch will use this property to save and restore objcg
for percpu unit allocator.
Acked-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231222031739.1288590-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bpf_mem_alloc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf_mem_alloc.h b/include/linux/bpf_mem_alloc.h index bb1223b21308..acef8c808599 100644 --- a/include/linux/bpf_mem_alloc.h +++ b/include/linux/bpf_mem_alloc.h @@ -11,6 +11,7 @@ struct bpf_mem_caches; struct bpf_mem_alloc { struct bpf_mem_caches __percpu *caches; struct bpf_mem_cache __percpu *cache; + struct obj_cgroup *objcg; bool percpu; struct work_struct work; }; |