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>