diff mbox series

[RFC,HACKS,07/11] mm/slub: Set __GFP_SENSITIVE for reclaimable slabs

Message ID 20250313-asi-page-alloc-v1-7-04972e046cea@google.com (mailing list archive)
State New
Headers show
Series mm: ASI integration for the page allocator | expand

Commit Message

Brendan Jackman March 13, 2025, 6:11 p.m. UTC
It's not currently possible allocate reclaimable, nonsensitive pages.
For the moment, just add __GFP_SENSITIVE.

This will need to be fixed before this can be a [PATCH].

Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
 mm/slub.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/slub.c b/mm/slub.c
index 1f50129dcfb3cd1fc76ac9398fa7718cedb42385..132e894e96df20f2e2d69d0b602b4719cdc072f5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5559,7 +5559,11 @@  static int calculate_sizes(struct kmem_cache_args *args, struct kmem_cache *s)
 		s->allocflags |= GFP_DMA32;
 
 	if (s->flags & SLAB_RECLAIM_ACCOUNT)
-		s->allocflags |= __GFP_RECLAIMABLE;
+		/*
+		 * TODO: Cannot currently allocate reclaimable, nonsensitive
+		 * pages. For the moment, just add __GFP_SENSITIVE.
+		 */
+		s->allocflags |= __GFP_RECLAIMABLE | __GFP_SENSITIVE;
 
 	/*
 	 * Determine the number of objects per slab