[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YpJNX7PN8hAFgVwj@casper.infradead.org>
Date: Sat, 28 May 2022 17:27:11 +0100
From: Matthew Wilcox <willy@...radead.org>
To: bh1scw@...il.com
Cc: Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Muchun Song <songmuchun@...edance.com>
Subject: Re: [PATCH] mm/slub: replace alloc_pages with folio_alloc
On Sun, May 29, 2022 at 12:11:58AM +0800, bh1scw@...il.com wrote:
> From: Fanjun Kong <bh1scw@...il.com>
>
> This patch will use folio allocation functions for allocating pages.
That's not actually a good idea. folio_alloc() will do the
prep_transhuge_page() step which isn't needed for slab.
> Signed-off-by: Fanjun Kong <bh1scw@...il.com>
> ---
> mm/slub.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index e5535020e0fd..00c4049a17d6 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1794,9 +1794,9 @@ static inline struct slab *alloc_slab_page(gfp_t flags, int node,
> unsigned int order = oo_order(oo);
>
> if (node == NUMA_NO_NODE)
> - folio = (struct folio *)alloc_pages(flags, order);
> + folio = (struct folio *)folio_alloc(flags, order);
> else
> - folio = (struct folio *)__alloc_pages_node(node, flags, order);
> + folio = (struct folio *)__folio_alloc_node(node, flags, order);
>
> if (!folio)
> return NULL;
> --
> 2.36.0
>
>
Powered by blists - more mailing lists