Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2935624rwr; Fri, 21 Apr 2023 17:26:20 -0700 (PDT) X-Google-Smtp-Source: AKy350bJTJnC3M/kITFh1XNuHiSpS38lo6zwNEzRQ5nNq+f1HKv6hKgW+Bs3OmqJ2ANNNDcp59hJ X-Received: by 2002:a05:6a21:3382:b0:e4:9a37:2707 with SMTP id yy2-20020a056a21338200b000e49a372707mr9471725pzb.5.1682123180038; Fri, 21 Apr 2023 17:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682123180; cv=none; d=google.com; s=arc-20160816; b=sX92E4VZxCmh5C+JyaxWFOIe2+L1Q0shgx/cl/1BmiPIfE3IGd0Nh2NKTyW7Dq3uW8 3bVGZ3WqkFMJ6PK4auZLWYlOl6a0koSm1/VTf1j399V8x5vDYp3FSCg5/4tUMVO6xaAV 9xEeiGG6GYINA7UxoZPJzWojISqysHlP2ZuHJhaU0Je2iZ3ytetYGrfCDzJ2e7WMy2za YQS1RXJv4WMbRejFDgVHV1NcraHlHmAvytnX2U8Mix6EyugwkReETom+3LM22GrQghH/ dy5p2j4wqCLHNvZ8delmk5bIzGTbarwX/lC8ZD0OhinLx/g8AYl4XYW6mKnZSuVvAi+M l6wQ== 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=JFKti6NhFrOmzRAC+SHrdFDeKbNA3mUM9FV9DFzwcIY=; b=Oq5hgt2Z0lNGDwlTpIY9WAw1BfXf0xuPjKtCo3oGMIunlc9+kaNCGzgd0gNGQIzlQu gTklx9QZDc++ANSJJe5s9+ZmwfwRSLhFkOb7Dm8PW6pfEBKuZRfvkKUgL7VanTv0bQAn x9su5AU/z93v6X4QAmEa0Zz5tShz4uHx5mFeDZM4j2kZ6u6zCg79peNuCNITdUMHojgv nio4Cs2Kv4SglDb0F43ANYxanX1jUWIoUp8UwuOMb5CDiyvYjHS/lXDBBgeJascEafaS lcqtpECwhv/m3WoPpEQsDA+aWd9rTg93ky5AJsFrpUflQY8HVDweFNhXh9N3Nm7bDpwS kkng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=YFGDGJg+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a63e54f000000b0051b718151a4si5665995pgj.201.2023.04.21.17.26.05; Fri, 21 Apr 2023 17:26:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=YFGDGJg+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233961AbjDVAPC (ORCPT + 99 others); Fri, 21 Apr 2023 20:15:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233520AbjDVAPA (ORCPT ); Fri, 21 Apr 2023 20:15:00 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F4C8DD for ; Fri, 21 Apr 2023 17:14:57 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-63b4bf2d74aso2299064b3a.2 for ; Fri, 21 Apr 2023 17:14:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1682122497; x=1684714497; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JFKti6NhFrOmzRAC+SHrdFDeKbNA3mUM9FV9DFzwcIY=; b=YFGDGJg+ycE0mNmKO4+mMxKlyNIeLyuiw3BMeu7/FLkdr9I7ue2w6t8LGmkLEryGCq aSueVAqkePVUC2bFRZNHMsqoqTTZapcFXkSWoSxWX5LNi0NEMo3DpFS/DY4BQhUjhZkD ei+0auvF6ES9BqdBcOQ3B7szfVz9qrZTVv1B5d8vvivr4oarGy7gqpUgjECURVPTNOM8 b7IraIQW5URwK5J/jVTx6zA/38KMYSXFOhbPYEl2EQvgP+czTYMeKImIfYqvycbGHHUY eXJo646zdyKoWzbYlDgZGjqVsbuE6lv4c2vPTsD7nBXbSme6NRNTTHcSlPZyv0mZhVn0 1/5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682122497; x=1684714497; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JFKti6NhFrOmzRAC+SHrdFDeKbNA3mUM9FV9DFzwcIY=; b=jsB4UhXxl00cq9M9FGlb+j58dINdURAFcvOaGOMxGLZWPJefJ1RIrKk8MsFFdDMkWE 6VK5jkUI49QTecvEKEkQg+jRUHz/BO8QaAT/Wgek7k14oktmHaOeAO1Pm20who4Jxkm0 +yLfG3SwjHL8OEc1UYED3mBRaV/n0+18FTGb9KKkoXHpNx7wXDvJI7UUC19YANAtFVP0 FflGAdLS7hXt64SNr7TQ+Ltorh85zKL01sj97jbZrAnZMDoseJEgG5T76cxxNdzlai6d vSVChWxuOhoxsbo8vcr5zaw3ZkVw7J3wxAKBrepagPPW9Voms+JgzM5RUN45CmblNhYs d9ag== X-Gm-Message-State: AAQBX9eAum/v4pRrCvLAT80hGIIaJpuz1H1jai/HL46T24dg6m+bbgm8 8ZXR2J913Qr1fZLY4cj1Jo1dqVS/20hMEozZgpc= X-Received: by 2002:a05:6a21:3396:b0:f0:6aaf:1abf with SMTP id yy22-20020a056a21339600b000f06aaf1abfmr10590477pzb.4.1682122497145; Fri, 21 Apr 2023 17:14:57 -0700 (PDT) Received: from dread.disaster.area (pa49-180-41-174.pa.nsw.optusnet.com.au. [49.180.41.174]) by smtp.gmail.com with ESMTPSA id b3-20020a631b03000000b0050f93a3586fsm3004610pgb.37.2023.04.21.17.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 17:14:56 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1pq0ty-006FW0-2f; Sat, 22 Apr 2023 10:14:54 +1000 Date: Sat, 22 Apr 2023 10:14:54 +1000 From: Dave Chinner To: "Darrick J. Wong" Cc: Pankaj Raghav , Hannes Reinecke , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mcgrof@kernel.org, SSDR Gost Dev Subject: Re: [PATCH] mm/filemap: allocate folios according to the blocksize Message-ID: <20230422001454.GQ447837@dread.disaster.area> References: <20230414134908.103932-1-hare@suse.de> <2466fa23-a817-1dee-b89f-fcbeaca94a9e@samsung.com> <1c76a3fe-5b7a-6f22-78e1-da4a54497ecd@samsung.com> <20230420150355.GG360881@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420150355.GG360881@frogsfrogsfrogs> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Thu, Apr 20, 2023 at 08:03:55AM -0700, Darrick J. Wong wrote: > On Thu, Apr 20, 2023 at 02:28:36PM +0200, Pankaj Raghav wrote: > > On 2023-04-20 14:19, Hannes Reinecke wrote: > > >> > > >> **Questions on the future work**: > > >> > > >> As willy pointed out, we have to do this `order = mapping->host->i_blkbits - PAGE_SHIFT` in > > >> many places. Should we pursue something that willy suggested: encapsulating order in the > > >> mapping->flags as a next step?[1] > > >> > > >> > > >> [1] https://lore.kernel.org/lkml/ZDty+PQfHkrGBojn@casper.infradead.org/ > > I wouldn't mind XFS gaining a means to control folio sizes, personally. > At least that would make it easier to explore things like copy on write > with large weird file allocation unit sizes (2MB, 28k, etc). [random historical musings follow] Ah, how things go full circle. This is how XFS originally worked on Irix - it had read and write IO sizes that it used to control the size of buffers allocated ifor caching data in the per-inode chunk cache. That stuff was in the original port to Linux, we even had a mount option to allow users to determine preferred IO sizes (biosize) but that was removed in 2019 ago because it hadn't done anything for more than a decade. That was done around the same time the mp->m_readio_blocks and mp->m_writeio_blocks variables that it originally influenced were removed. Extent allocation sizes are still influenced this way by the allocsize mount option and m_writeio_blocks was renamed m_allocsize_blocks to keep this functionality for extent allocation... Cheers, Dave. -- Dave Chinner david@fromorbit.com