From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6A9AC7EE23 for ; Sun, 4 Jun 2023 21:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230378AbjFDVsx (ORCPT ); Sun, 4 Jun 2023 17:48:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230014AbjFDVsv (ORCPT ); Sun, 4 Jun 2023 17:48:51 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A497BA6; Sun, 4 Jun 2023 14:48:50 -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-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=gILJMJ7zAX5FszlXmfmXwAcEe3qX1qwR2lF0jBMnNmU=; b=H+cunD92N3eO7OaGb20Kd9Y3U1 2ZKayg3bWpHtA1Df1gMo3Zml5lDSsUl8I+gCJbiTbCQ6jlRukxCohnk4FMoXBOTX09K6Rvcov+nc0 aHUgpfp/QpWw5GpxuXt8ocCPCtdEFiEu8ZoahhON2VSmneov7n2mSHSg75ZFNyOD26v7BNsBdIrOC YDxrespc413EPtmgNgqot+PZzdAxYI7eHHurvYGeW7UMCs1yOfkaEiMPyWRjH3G1Hp/vTgunApY1D onN5BgTrpDMXMZU3y3XN4iY4NlauEdbWAkAra36AacZsK+Y/5Ic0LRaV7Iir1kYNLpZ+jB5IuBwhe 4UXu5/DA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1q5vah-00BNeK-4Z; Sun, 04 Jun 2023 21:48:47 +0000 Date: Sun, 4 Jun 2023 22:48:47 +0100 From: Matthew Wilcox To: "Darrick J. Wong" Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, Wang Yugui , Dave Chinner , Christoph Hellwig Subject: Re: [PATCH v2 5/7] filemap: Allow __filemap_get_folio to allocate large folios Message-ID: References: <20230602222445.2284892-1-willy@infradead.org> <20230602222445.2284892-6-willy@infradead.org> <20230604180925.GF72241@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230604180925.GF72241@frogsfrogsfrogs> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sun, Jun 04, 2023 at 11:09:25AM -0700, Darrick J. Wong wrote: > On Fri, Jun 02, 2023 at 11:24:42PM +0100, Matthew Wilcox (Oracle) wrote: > > + do { > > + err = -ENOMEM; > > + if (order == 1) > > + order = 0; > > Doesn't this interrupt the scale-down progression 2M -> 1M -> 512K -> > 256K -> 128K -> 64K -> 32K -> 16K -> 4k? What if I want 8k folios? You can't have order-1 file/anon folios. We have deferred_list in the third page, so we have to have at least three pages in every large folio. I forget exactly what it's used for; maybe there's a way to do without it, but for now that's the rule.