summaryrefslogtreecommitdiff
path: root/include/linux/bpf_mem_alloc.h
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2023-12-22 06:17:39 +0300
committerAlexei Starovoitov <ast@kernel.org>2024-01-04 08:08:25 +0300
commit9fc8e802048ad150e8032c4f3dbf40112160cfe9 (patch)
treea77e0d24b1ba2a4d53645bbed8a724e7f6145c45 /include/linux/bpf_mem_alloc.h
parent9beda16c257d55213f70adee2f16d7f13a8502e1 (diff)
downloadlinux-9fc8e802048ad150e8032c4f3dbf40112160cfe9.tar.xz
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/linux/bpf_mem_alloc.h')
-rw-r--r--include/linux/bpf_mem_alloc.h1
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;
};