diff options
author | Roman Gushchin <[email protected]> | 2020-12-01 13:58:28 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2020-12-02 18:28:06 -0800 |
commit | 270c6a71460e12b07b1dcadf7457ff95b6c6e8f4 (patch) | |
tree | e8193c62193e2da704a7fcd98d1961e5a03703a1 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | bcfe06bf2622f7c4899468e427683aec49070687 (diff) |
mm: memcontrol/slab: Use helpers to access slab page's memcg_data
To gather all direct accesses to struct page's memcg_data field in one
place, let's introduce 3 new helpers to use in the slab accounting code:
struct obj_cgroup **page_objcgs(struct page *page);
struct obj_cgroup **page_objcgs_check(struct page *page);
bool set_page_objcgs(struct page *page, struct obj_cgroup **objcgs);
They are similar to the corresponding API for generic pages, except that
the setter can return false, indicating that the value has been already
set from a different thread.
Signed-off-by: Roman Gushchin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions