diff options
author | Suren Baghdasaryan <surenb@google.com> | 2023-02-21 23:43:29 +0000 |
---|---|---|
committer | Suren Baghdasaryan <surenb@google.com> | 2023-04-30 23:22:58 +0000 |
commit | ff557b8f4d13c7465b2bf716d74c6541c7e3a7cc (patch) | |
tree | a8c55fa8039b724bd24d406edc336b6abd6ab49f /include/linux/memcontrol.h | |
parent | 85377dbf4d291786a17a1aaae9e03d661d04fd25 (diff) |
codetag: debug: introduce OBJEXTS_ALLOC_FAIL to mark failed slab_ext allocations
If slabobj_ext vector allocation for a slab object fails and later on it
succeeds for another object in the same slab, the slabobj_ext for the
original object will be NULL and will be flagged in case when
CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled.
Mark failed slabobj_ext vector allocations using a new objext_flags flag
stored in the lower bits of slab->obj_exts. When new allocation succeeds
it marks all tag references in the same slabobj_ext vector as empty to
avoid warnings implemented by CONFIG_MEM_ALLOC_PROFILING_DEBUG checks.
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index c7f21b15b540..3eb8975c1462 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -356,8 +356,10 @@ enum page_memcg_data_flags { #endif /* CONFIG_MEMCG */ enum objext_flags { + /* slabobj_ext vector failed to allocate */ + OBJEXTS_ALLOC_FAIL = __FIRST_OBJEXT_FLAG, /* the next bit after the last actual flag */ - __NR_OBJEXTS_FLAGS = __FIRST_OBJEXT_FLAG, + __NR_OBJEXTS_FLAGS = (__FIRST_OBJEXT_FLAG << 1), }; #define OBJEXTS_FLAGS_MASK (__NR_OBJEXTS_FLAGS - 1) |