Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4782689rdb; Fri, 15 Sep 2023 12:04:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+Ev5J4ZO8Q6fbLNMbrOfzkagEAW333zfhIswGGSY+HXyVJ1SQ0UNvp8ei62AcI1XUeHMn X-Received: by 2002:a05:6a00:1784:b0:68f:cc67:e709 with SMTP id s4-20020a056a00178400b0068fcc67e709mr10101699pfg.16.1694804666171; Fri, 15 Sep 2023 12:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694804666; cv=none; d=google.com; s=arc-20160816; b=s7uAR+FZoUDeKOlF+yxmfzs26T+23tr7bV13uhXi31Out9AquGOFfA93ko9QvSIDPX KXHdFrJZi8yFI5eyYCKyAsy7oXG1n3lOIa8CMaosCTqo4Lb0WcZtWLKAoN4Ph9LWNbB/ rqldsrC6ZRhSNFUNDN8Sv2L0snzqhUMRmOC99F/+9OegWCOOpLQUvwspNNYArgkIGOBJ tforzLK0v/w4tAPoDqvYMkChhi2twhqMd5p3ilKlyFlO+8XNsdo4cyXah80rbjkSjvVW KUT2vKZ9pr5OrsbDjR//NeAuSjRKsz8HWoeSYz5+lMxY+Hu3EVATXneF6cKrrwcc0D9J 3G2g== 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=zcm9ZNAum/1OuCWgAEkVFo/U1hKtH0j593KfRJ82drQ=; fh=ardmABoZqyzAm25ow9fvqe18o8v8L1P0+Wo2I9sPHpg=; b=oUpzSrAQJ4jYEaxEXAEGI1R2gm41ZSV2qehLKEHv0JJJxysAvAdLbem4hViMrCCCBl IG1uohItQmH2alhDaKhtWjHfF+sIENB9iyX+fkTAcyim8zSB45Kr6PT/LvQiQIh+F8rU HEvBTA2xt91Nw0sF7cB5N1BWPCUbTf9zrNKWa/PaLeNMh/Z33oIAEZeh6pg7mKELEzOS PWkw7VEfbBuloh2XLV8Okr/KlCw0jHte5VZRsiaH8Lv4fbdLtq7mz9PNc61Xntq5exCV qgBEZ4CEGw80wajAgXppnP0NqTsQG8TMNfvFA9DL4yafU/1VeS+iwsyVYgWQKt4/2fGV peJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KwvJgFZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h7-20020a056a00170700b0068e2566615esi3854585pfc.379.2023.09.15.12.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 12:04:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KwvJgFZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6DFF481A43E2; Fri, 15 Sep 2023 05:20:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234717AbjIOMUb (ORCPT + 99 others); Fri, 15 Sep 2023 08:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234691AbjIOMUa (ORCPT ); Fri, 15 Sep 2023 08:20:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB774270E; Fri, 15 Sep 2023 05:20:05 -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=zcm9ZNAum/1OuCWgAEkVFo/U1hKtH0j593KfRJ82drQ=; b=KwvJgFZDEOT76rMuRHZbISa1sV RZE1VGxea/J7HxIU2mbnRkiki3wprSXcNf3J92Y/LvYxcBq47TmwVdEw7iYaypEAht1fBIi8d+ef4 qQxWh3TeW1Uu6w4RqTElSTO6jpM1pOR/YcwV0A6ZrsozQ/XGy3hZoS7GPeRkExwMxBbZqdWrLoWtW CxiN+19fzF5gxam3lWayx1PHzl5WJ1gFM949cfpU8gZZYlmma3umCLK9UFJknwDElEjrnV25R/Yth F89C6Js6Isw/FXrMpUwpOFjvgcLAArVa3e64MuUIFvAkK4WPrqhVxvwiMJRxu33P0+/vMigoeAUHR lbMYxD7g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qh7ng-009cY9-Hn; Fri, 15 Sep 2023 12:19:56 +0000 Date: Fri, 15 Sep 2023 13:19:56 +0100 From: Matthew Wilcox To: Daniel Gomez Cc: "minchan@kernel.org" , "senozhatsky@chromium.org" , "axboe@kernel.dk" , "djwong@kernel.org" , "hughd@google.com" , "akpm@linux-foundation.org" , "mcgrof@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [PATCH 4/6] shmem: add order parameter support to shmem_alloc_folio Message-ID: References: <20230915095042.1320180-1-da.gomez@samsung.com> <20230915095042.1320180-5-da.gomez@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915095042.1320180-5-da.gomez@samsung.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 05:20:32 -0700 (PDT) On Fri, Sep 15, 2023 at 09:51:28AM +0000, Daniel Gomez wrote: > In preparation for high order folio support for the write path, add > order parameter when allocating a folio. This is on the write path > when huge support is not enabled or when it is but the huge page > allocation fails, the fallback will take advantage of this too. > static struct folio *shmem_alloc_and_acct_folio(gfp_t gfp, struct inode *inode, > - pgoff_t index, bool huge) > + pgoff_t index, bool huge, unsigned int *order) I don't understand why you keep the 'huge' parameter when you could just pass PMD_ORDER. And I don't understand why you're passing a pointer to the order instead of just passing the order.