# Re: \[PATCH v14 038/138\] mm/memcg: Add folio\_memcg() and related functions

- From: David Howells \<dhowells@redhat.com\>
- Date: 2021-08-10 20:18:08 
- List: linux-fsdevel
- Page: https://ratatoskr.run/linux-fsdevel/2021/08/211996
- Thread: https://ratatoskr.run/linux-mm/2021/07/209943/t/4.md

```text
Matthew Wilcox (Oracle) [ref] wrote:

> 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>

```
