Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2436451ioo; Sat, 28 May 2022 13:38:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDmMDLGnsaJPIf/Y0ONKmF32zcAZ5NfUWSHk7nfZUy3Jsl9uRp7fQPjTllCh/KzGlJhlOD X-Received: by 2002:a63:ec17:0:b0:3fa:74c5:32ef with SMTP id j23-20020a63ec17000000b003fa74c532efmr24435030pgh.505.1653770288074; Sat, 28 May 2022 13:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653770288; cv=none; d=google.com; s=arc-20160816; b=GjPRDukmk18bj8fGrBelYkJMOBStgvZViJRxCssPbRoFw8KELpO8xJvXkftdASuKbV UtSuaUkK54RxY0LuvNCoi2qNaZW//RIE9j+WNm7hRu9xCG8BmQXM6VGeK6AebZyMrEg5 GPqbt2HcxkkSr2Nn1RVlMdT0M9EriAonwLkJ/QvN+c+M08Wya0vHbywor5K34R4OLIhg R6chX4+/02vkrdKoUuGgXBjXaUOzYi4wGOP70QyuYCYBlomgNbB6eA6MBqoBciNo5CKg YkJgbFNlBGxyOY0OJVTwvfKHfzXeg9pM4yR+fGmefOIya/8uGYIM1QMcmXVKy785gMSp UaJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YTEqwGZRFNtxwUVIHGKs3ZV8xkp5O0m4kBntoOiZZ5o=; b=jTXPi6LdACgQhFXbc+yTF6UR8rbM+sMzzIcP+E2ZNZHei/OyuUsGGL4d/aEjC7xjw1 psOo84npIDapHXZ9ey2vB38+18IOuAuLFWmZU4LR16bydisHiINtn1Hp5AFel9m/U8qU w6JUXtKjP/ibm7JnMW043wxVU0Yg827tQAlc/hvhbfRKAusIekERgcM/uTO1DpJ44Ko5 UylwSk1gjqs6NVrT73e2r9ELY4iJ/ZJNlNdN68K5qT3OQ/MN1zIKg62HGr50cTED886s WTjKGxMQxEq32lwiA6YU16pk6wWPRsAKachasbR2sGYnlGYGH0Mpxj0BWDUVJXulahYw CgNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UoeecDCn; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y6-20020a170902864600b0015e8509c44dsi9046715plt.171.2022.05.28.13.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:38:08 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UoeecDCn; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AE0DEA26ED; Sat, 28 May 2022 12:40:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238364AbiE1Q1b (ORCPT + 99 others); Sat, 28 May 2022 12:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238380AbiE1Q12 (ORCPT ); Sat, 28 May 2022 12:27:28 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4378140EB for ; Sat, 28 May 2022 09:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YTEqwGZRFNtxwUVIHGKs3ZV8xkp5O0m4kBntoOiZZ5o=; b=UoeecDCn63hZqFXDKKu7wml7az aDkNJDVHKkIbDz8zPADZEFb1GVkC1iDSW/wo/oVZVfKPaeL5U8zf3LLVvPIV976inQkhlPGwWjWIz Vyi8oJ5PnQrmx03jNiZz9XrRMd7rKu9eTJDoSu1/v4MdHy52iXnNUvkn4M07+kmwWjnhrxUXr3Wab H6crFaO+FEyTxl+NUvcDe2CZwvn/Q2MrILFQF0b1K9h6udPL7zyzJAX9aykBFoBUfLu26YTLwPr/r Kvi43yU6VV/nosb6HooM/lQa2dP8IUh6YE8SHkm7mE4YlaufDp0nraysMwsmQkf+NTGl8VaE8obkv AYTjZpmg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuzHT-002yuE-Gc; Sat, 28 May 2022 16:27:11 +0000 Date: Sat, 28 May 2022 17:27:11 +0100 From: Matthew Wilcox To: bh1scw@gmail.com Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song Subject: Re: [PATCH] mm/slub: replace alloc_pages with folio_alloc Message-ID: References: <20220528161157.3934825-1-bh1scw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220528161157.3934825-1-bh1scw@gmail.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 29, 2022 at 12:11:58AM +0800, bh1scw@gmail.com wrote: > From: Fanjun Kong > > 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 > --- > 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 > >