Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp875367pxb; Wed, 1 Sep 2021 11:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvygo2/uIeWokN1PGb6BeFM4MOMqHMmXvR0L1ny6paYtRnXepssJrIobFheu5L4fUtGRvQ X-Received: by 2002:a17:906:49ce:: with SMTP id w14mr985995ejv.273.1630522325422; Wed, 01 Sep 2021 11:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522325; cv=none; d=google.com; s=arc-20160816; b=ifC7NVEIPIPrygpvT9I/FA/nKsAJem5v3Cb+DEc2ueFb+mJ5q4JCk2iGpQByQdwtN6 2KGinET55nNNDmYpIR7vZivc13S7pvpTDH4TsP3zhIdYFsp9Nyi//eaW3YUY0Wd8cFUj IhxBnuPHM9XiOFpcOprmHchZSM7z0AvymY8EE5DoSj24kMkKAhw4e6TeVFd13V6nb03u Va/T1fUA6owT2hN3TjXozLL8qyAf96lb2fF//NbMWkY0vkXX6epBGezQfuWVLfNA0hav TSsfV5Jx65IbEeSVKDT4ypstLTF8BI63U5Vr0X/YwO8Ke7OaXLu0mmTDRJZwLQ1k+px+ XJcg== 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=6TBF+qXplc9oeCUOY+UjwCh+LIVpyFyk42tsJE47zzc=; b=TCepXRfKeZ1u2G0qEK3xu3zw95AKs+k0s8SAjsmhyPbCjA3lWo2hEY0bQpEpvBcqiN 4ojScY003h36YWwklCgNIjk0bEdvCTIgtvbcL7o56B0zUvrkxAdA6iLv36eVc0o8Fo08 CXwwzkJsGRTUztWqxW0sD5SJOm7zN0oJGqSW2aXsdo4BJGB0+pqhDYm+UBFpa522MoJk HTQcR0hRl0xuJTU5rqbO6/mTztKkF75KFjhXqGpfcxkkzRPvP3F+/TDgBo2fhaDnwWWz mmeVo6gShcwCab7WX/njuk4HHOR8B3KW7/luB5XnK9S2dkbwT16W07+eVElL5P6tIjpq uRrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=dqWKrOMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si654875ejy.51.2021.09.01.11.51.42; Wed, 01 Sep 2021 11:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=dqWKrOMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243729AbhIAJmG (ORCPT + 99 others); Wed, 1 Sep 2021 05:42:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243725AbhIAJmF (ORCPT ); Wed, 1 Sep 2021 05:42:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32503C061575; Wed, 1 Sep 2021 02:41:09 -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=6TBF+qXplc9oeCUOY+UjwCh+LIVpyFyk42tsJE47zzc=; b=dqWKrOMNN3eJvo4aHYae9gFmrM VyRA/uIp3lROX+RFWQcbkLXz1Yaq8CegwdNirdWf8U5rc7Xpl89yG3I+Bt62r5ZvXxtfsLcZE22A7 p+1xifRCxwXZCOsiYJYIf8QCK0z4OYBu7VxfZtTyYozz8bRZzXWUfcn2zZ5OHwU1nQ5HwDziiqk7w 0Tdjlch7I2luiDWTEgPDVYgFIkEdWUB4+cCi9GZq+x7saZ53dzYG1n/6MbSX5LD4kJuDIxOj1xXOO SQEuEIWDWWVS10gBOnie2RpN83bbzf2kM8dZXNbyZVz6gJqaz28y1BDv9jtCIHNgAdwRd2o3wDCU7 SfPmfJ1A==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLMj3-0026bK-LF; Wed, 01 Sep 2021 09:40:18 +0000 Date: Wed, 1 Sep 2021 10:40:09 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Johannes Weiner , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: Discontiguous folios/pagesets Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 28, 2021 at 08:04:15PM +0100, Matthew Wilcox wrote: > Non-power-of-two folios are more awkward. Any calls to folio_order() > and folio_shift() have to be guarded by folio_test_contig() (which will > be fine). The bigger problem is the radix tree. It really only works > for power-of-two sized objects (and honestly, it's not even all that > great for things which aren't a power of 64 in size). See appendix > for more details. Honestly I think this framing the wrong problem. Folios are a way to manage memory which should be about how to manage memory, not about offloading awkward file systems tasks to performance sensitive core code. Right now the proper answer to supporting reflinks on RT devices with non-power of two extent sizes is don't do it, which is pretty easy given that XFS doesn't even support reflink on the RT device at all yet. And if someone has a strong enough use case for eflinks on a weird extent size RT device they'll find way to support it, preferably without making a mess out of the core Linux memory management. Because even if we did support non-power of two folios sizes we'd still need to gurantee XFS would always be able to allocate one for that case, which just sounds like a trainwreck waiting to happen.