mm/memcg: Add folio_memcg() and related functions
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 28 Jun 2021 18:59:26 +0000 (14:59 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 27 Sep 2021 13:27:31 +0000 (09:27 -0400)
commit1b7e4464d43a488e383843bf96ec62d12393bff1
tree4f40c7b95125160196b6c4977db0ef352c983c61
parent8e88bd2dfde222285a56a54b0400942b5b33da20
mm/memcg: Add folio_memcg() and related functions

memcg information is only stored in the head page, so the memcg
subsystem needs to assure that all accesses are to the head page.
The first step is converting page_memcg() to folio_memcg().

The callers of page_memcg() and PageMemcgKmem() are not yet ready to be
converted to use folios, so retain them as wrappers around folio_memcg()
and folio_memcg_kmem().  They will be converted in a later patch set.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/memcontrol.h
mm/memcontrol.c