]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/memcg: use order instead of nr in split_page_memcg()
authorZi Yan <ziy@nvidia.com>
Mon, 3 Apr 2023 20:18:33 +0000 (16:18 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:55 +0000 (16:02 -0700)
commit74c05a33f6e1526a178c89b859cf88452e1d8c97
treeb9eeaca06e727c0e010be923931e2cf14b0d5ea0
parentbb56c790527e800f75022b081bf4b5cbf2d99207
mm/memcg: use order instead of nr in split_page_memcg()

Patch series "Split a folio to any lower order folios", v3.

File folio supports any order and people would like to support flexible
orders for anonymous folio[1] too.  Currently, split_huge_page() only
splits a huge page to order-0 pages, but splitting to orders higher than 0
is also useful.  This patchset adds support for splitting a huge page to
any lower order pages and uses it during file folio truncate operations.

This patch (of 7):

We do not have non power of two pages, using nr is error prone if nr is
not power-of-two.  Use page order instead.

Link: https://lkml.kernel.org/r/20230403201839.4097845-1-zi.yan@sent.com
Link: https://lkml.kernel.org/r/20230403201839.4097845-2-zi.yan@sent.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Zach O'Keefe <zokeefe@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/huge_memory.c
mm/memcontrol.c
mm/page_alloc.c