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 59B54EB64DC for ; Tue, 11 Jul 2023 00:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjGKAVH (ORCPT ); Mon, 10 Jul 2023 20:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjGKAVG (ORCPT ); Mon, 10 Jul 2023 20:21:06 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6A93FB; Mon, 10 Jul 2023 17:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=oKMPRltSL5oJpUkPhsbe0HpEgmOXSJnh20eXBSK1NtM=; b=nbOwz4hsHGCYaZlXREiRr3naZ3 ws80+poluFsMrrCOFw53Ad9v9f9lnkpPyB//bLAIsGzOQg3Pqqee0Yc+BRwIMQC8XoZ5aRlVah5DL 3/IL2CyqAeW6rm5H9OqYs0cWdsMIeT1ZZfI0hbVzOk6p8oXT6BbT2lsInL6VGoEBWuWEqVMm0dCj3 hF15UelGGR9KDoyj+CwwUBZQ0JZtxA0EweNejiTsqTDw5iK7Bs/5p3XsRM9rwkAMMDxqQ1P+yCAim WCQhzn5ficA1Z2nSobjFJdSIgRG+5ksTdq8Za5ZNiHgqjk/61fQbzDoVh0QuQZPRN9gPd3jcS1XwZ pCn8KTNg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qJ17o-00D39j-12; Tue, 11 Jul 2023 00:21:04 +0000 Date: Mon, 10 Jul 2023 17:21:04 -0700 From: Luis Chamberlain To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, Wang Yugui , Dave Chinner , Christoph Hellwig , "Darrick J . Wong" , Kent Overstreet , Christoph Hellwig Subject: Re: [PATCH v4 7/9] filemap: Allow __filemap_get_folio to allocate large folios Message-ID: References: <20230710130253.3484695-1-willy@infradead.org> <20230710130253.3484695-8-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Jul 11, 2023 at 01:07:37AM +0100, Matthew Wilcox wrote: > The caller hints at the > folio size it wants, and this code you're highlighting limits it to be > less than MAX_PAGECACHE_ORDER. Yes sorry, if the write size is large we still max out at MAX_PAGECACHE_ORDER naturally. I don't doubt the rationale that that is a good idea. What I'm curious about is why are we OK to jump straight to MAX_PAGECACHE_ORDER from the start and if there are situations where perhaps a a not-so-aggressive high order may be desriable. How do we know? Luis