Re: [PATCH v2 2/6] slub: Use alloc_pages_node() in alloc_slab_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Dec 2023, Matthew Wilcox (Oracle) wrote:

For no apparent reason, we were open-coding alloc_pages_node() in
this function.

The reason is that alloc_pages() follow memory policies, cgroup restrictions etc etc and alloc_pages_node does not.

With this patch cgroup restrictions memory policies etc etc no longer work in the slab allocator.

Please revert this patch.

diff --git a/mm/slub.c b/mm/slub.c
index 35aa706dc318..342545775df6 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2187,11 +2187,7 @@ static inline struct slab *alloc_slab_page(gfp_t flags, int node,
	struct slab *slab;
	unsigned int order = oo_order(oo);

-	if (node == NUMA_NO_NODE)
-		folio = (struct folio *)alloc_pages(flags, order);
-	else
-		folio = (struct folio *)__alloc_pages_node(node, flags, order);
-
+	folio = (struct folio *)alloc_pages_node(node, flags, order);
	if (!folio)
		return NULL;

--
2.43.0






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux