Skip to contentSkip to conversation

memcg-page_alloc-skip-bulk-allocator-for-__gfp_account.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 1, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: memcg: page_alloc: skip bulk allocator for __GFP_ACCOUNT
has been removed from the -mm tree. Its filename was
memcg-page_alloc-skip-bulk-allocator-for-__gfp_account.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Shakeel Butt <[email protected]>
Subject: memcg: page_alloc: skip bulk allocator for __GFP_ACCOUNT

commit 5c1f4e690eec ("mm/vmalloc: switch to bulk allocator in __vmalloc_area_node()") switched to bulk page allocator for order 0 allocation backing vmalloc. However bulk page allocator does not support __GFP_ACCOUNT allocations and there are several users of kvmalloc(__GFP_ACCOUNT).

For now make __GFP_ACCOUNT allocations bypass bulk page allocator. In future if there is workload that can be significantly improved with the bulk page allocator with __GFP_ACCCOUNT support, we can revisit the decision.

---

 mm/page_alloc.c |    4 ++++
 1 file changed, 4 insertions(+)
mm/page_alloc.c renamed from mm/page_alloc.c~memcg-page_alloc-skip-bulk-allocator-for-__gfp_account +4 -0
@@ -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;

_

Patches currently in -mm which might be from [email protected] are

memcg-flush-stats-only-if-updated.patch memcg-unify-memcg-stat-flushing.patch memcg-kmem-further-deprecate-kmemlimit_in_bytes.patch