Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2597639ioo; Sat, 28 May 2022 20:00:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYIzpaM7ZodICRwIYkzCIabJLSEFip517zk4+IuAZBdhiSzMyRsApFtVG6fJSXJyUDXltS X-Received: by 2002:a17:902:d48a:b0:163:8365:b69f with SMTP id c10-20020a170902d48a00b001638365b69fmr13847319plg.50.1653793221749; Sat, 28 May 2022 20:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653793221; cv=none; d=google.com; s=arc-20160816; b=WvcaK/msNLz+h1IYbUUgfwELUB/NhLciv80pahjgXwMTAk+ADNitlILFv7eGc4eI6S NNDXjWwm7ppxGqf/jajbrXwupwEZYmUH+ovfv6brDnw2MOgLKTmgErvzbaQXKfNC9u4n 7QfESl36eTXqgx4J3qRX1rFVVR35tBGOdUjkLOT5FN+HXuGLGlbOGNfY2P4wovEdYkQ3 uy0LAuW8mF3ec1Wzlrb9OqzqCC+DwiPn6sh+85j4UhySVB5+f5VwVaG7DYxzTYHxlkXG 7OjllfOlIM668emYJlwn0Phdb8imesGrWiG4I5Mm1Aud/1dT3PBT6y/5SEgkDy2wbFHy yRng== 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=xqZyFR77LZa5HhEYDYSFVBgW+mJdeOilKX5Bk1mPIAU=; b=QO088ijAOTQZZUo3HTsza53nzO4HmQS7Qd5Dg6NBI/wE1WIrj+kqxKwko/q0VNIMxp 6zXbqru5YE8VXRxPVxR7bxzeUwjhv3DWW5njikJvIXiFRiX/NsPFX37u9h2kS6jvbBPe zmQOxwm65826RLWmjqJ1C3LLQ8YEuPrXLn8R9KWjqOaEHi9d4tTjsvAYcYE79/NklyF+ phC5e2GTdU0C45QYU2NTiYFRDMannT6ZS52tf6TxlVIuCOj1Cnny5DKMTEKsyWrUZfRH vz0wWR8bqL+O6w0VJjHA5Q9wSi3rBm14JcuFmbXy+OmQYpdZHmM81EUPqYBUyykjEMxL YoYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="c8lMNY/s"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id fu11-20020a17090ad18b00b001d2fe6d0a11si7848410pjb.176.2022.05.28.20.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 20:00:21 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="c8lMNY/s"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E86ACA26F3; Sat, 28 May 2022 19:58:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbiE2C60 (ORCPT + 99 others); Sat, 28 May 2022 22:58:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229820AbiE2C6Y (ORCPT ); Sat, 28 May 2022 22:58:24 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3C549CC87 for ; Sat, 28 May 2022 19:58:23 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id w2-20020a17090ac98200b001e0519fe5a8so7640996pjt.4 for ; Sat, 28 May 2022 19:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xqZyFR77LZa5HhEYDYSFVBgW+mJdeOilKX5Bk1mPIAU=; b=c8lMNY/sSIphdNiJshAYMu1CqUjbD5PanBJG75iQdDbbSaL+tBEsMNufhxMbyMmLq9 S6I3H22KxlNT+gAJkNrkj6Bz0b16LryVW0uLjqQqQTSnundCo/WIqxpvHttLS/ACJfLJ HVLY3NDiSnjjB5erjgkc8B3XunjQa7waGRcwPiLNAXldXON1Fk1mbG1Dp3dymRnZ6tjn 8zVpsbRj7VGyqBKb7jNxV70lfvZxznUS0G8RwR8IzMrj0uV+qiiJQepoHH0r2Xm03TSU J2H/kBaD+5EmHU0V97btF9mL0slO+zMalJunTAkzK7WsPs+AjvE1QDElNKacsjg+omgK P1Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xqZyFR77LZa5HhEYDYSFVBgW+mJdeOilKX5Bk1mPIAU=; b=z+RsfuGDPyX0qfhl/0GmbbkHFf6ywOm3Qxq0NXmCUGQ9DdX/k4D3pbt7NydX4XowNo Kc4ooszDJN3U8174ovsxuWGPPmxY+78kJIuiXVEYbs+vRf/zeT46skI311n+Rh1gdNyP iOjEqTDvr8w07nWhZEbU2+XUuUtZuESa1lGlNdGfcYXjJGOUAhxNEDe7o774076wj1Ah +ShFCyrThtrKhZOQkIbMQ79eLDDnPQoSDguFub9NJ9IQJyvCCnP2desNvp/hBCfN088r 6mNFtLQOUuZpFcKKw+v99TqDkICzp1PJvbG8ebG6AO1swkXZ+yvIAVsnarpkmDVuXiAg ndeA== X-Gm-Message-State: AOAM5335P3lxueOKe2fafC8C5JB/k2lOuj5a1cvpkgOhnr2M/YHfa33V fO3m5fwGlo8MPMlVQVf++4jwpw== X-Received: by 2002:a17:903:209:b0:161:7f66:b9e0 with SMTP id r9-20020a170903020900b001617f66b9e0mr33873163plh.73.1653793103197; Sat, 28 May 2022 19:58:23 -0700 (PDT) Received: from localhost ([139.177.225.238]) by smtp.gmail.com with ESMTPSA id c20-20020a170902c2d400b001637704269fsm1974580pla.223.2022.05.28.19.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 19:58:22 -0700 (PDT) Date: Sun, 29 May 2022 10:58:18 +0800 From: Muchun Song To: Matthew Wilcox Cc: bh1scw@gmail.com, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org 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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 Sat, May 28, 2022 at 05:27:11PM +0100, Matthew Wilcox wrote: > 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. > You mean folio_alloc() is dedicated for THP allocation? It is a little surprise to me. I thought folio_alloc() is just a variant of alloc_page(), which returns a folio struct instead of a page. Seems like I was wrong. May I ask what made us decide to do this? Thanks.