summaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2021-11-02 22:42:04 +0100
committerVlastimil Babka <vbabka@suse.cz>2022-01-06 12:26:14 +0100
commit4b5f8d9a895ada8e0abb58ccd35d9fe229e3a595 (patch)
tree6c55347fdbdc415ed989b4705c5bdf4694ec43e2 /COPYING
parent40f3bf0cb04c91d33531b1b95788ad2f0e4062cf (diff)
mm/memcg: Convert slab objcgs from struct page to struct slab
page->memcg_data is used with MEMCG_DATA_OBJCGS flag only for slab pages so convert all the related infrastructure to struct slab. Also use struct folio instead of struct page when resolving object pointers. This is not just mechanistic changing of types and names. Now in mem_cgroup_from_obj() we use folio_test_slab() to decide if we interpret the folio as a real slab instead of a large kmalloc, instead of relying on MEMCG_DATA_OBJCGS bit that used to be checked in page_objcgs_check(). Similarly in memcg_slab_free_hook() where we can encounter kmalloc_large() pages (here the folio slab flag check is implied by virt_to_slab()). As a result, page_objcgs_check() can be dropped instead of converted. To avoid include cycles, move the inline definition of slab_objcgs() from memcontrol.h to mm/slab.h. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Roman Gushchin <guro@fb.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: <cgroups@vger.kernel.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions