Message ID | 20211028213604.wxCte4LAl%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/11] memcg: page_alloc: skip bulk allocator for __GFP_ACCOUNT | expand |
--- a/mm/page_alloc.c~memcg-page_alloc-skip-bulk-allocator-for-__gfp_account +++ a/mm/page_alloc.c @@ -5223,6 +5223,10 @@ unsigned long __alloc_pages_bulk(gfp_t g if (unlikely(page_array && nr_pages - nr_populated == 0)) goto out; + /* Bulk allocator does not support memcg accounting. */ + if (memcg_kmem_enabled() && (gfp & __GFP_ACCOUNT)) + goto failed; + /* Use the single page allocator for one page. */ if (nr_pages - nr_populated == 1) goto failed;