From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Sterba Subject: Re: [PATCH] btrfs: Disable BTRFS on platforms having 256K pages Date: Thu, 10 Jun 2021 18:20:46 +0200 Message-ID: <20210610162046.GB28158@suse.cz> References: <185278AF-1D87-432D-87E9-C86B3223113E@fb.com> Reply-To: dsterba@suse.cz Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623342211; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KjKhr3a6YXymIHtw/GA/lThxHjdin/LlLBM4rjmo30o=; b=OaCK2JwDCJzSG8mw0/KxhlY24EZJYzmrY1pCXj1ftvfhrFWiJeWwKCF6VRt/3GNGIZQTKI 64uAumwxrCoYdgNTs61JjnnHSiudVprP6OUXn6eQhEtgRh2PJr0hss4Xc4UV44n8M0sx8X PenUaTJWzag3UNmGuL8gosguy0gx3Mk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623342211; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KjKhr3a6YXymIHtw/GA/lThxHjdin/LlLBM4rjmo30o=; b=Q1+SIX5fmet/R8yDOZj1UmQUYKVKEEmnbImI7UgkAOw2mAruK7BtMq2iRopww2P1n1GTgZ Q69a5hyw9tRxW6Cg== Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="utf-8" To: Christophe Leroy Cc: Chris Mason , Josef Bacik , David Sterba , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , linux-btrfs , "linux-hexagon@vger.kernel.org" On Thu, Jun 10, 2021 at 04:50:09PM +0200, Christophe Leroy wrote: > > > Le 10/06/2021 à 15:54, Chris Mason a écrit : > > > >> On Jun 10, 2021, at 1:23 AM, Christophe Leroy wrote: > >> > >> With a config having PAGE_SIZE set to 256K, BTRFS build fails > >> with the following message > >> > >> include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0 > >> > >> BTRFS_MAX_COMPRESSED being 128K, BTRFS cannot support platforms with > >> 256K pages at the time being. > >> > >> There are two platforms that can select 256K pages: > >> - hexagon > >> - powerpc > >> > >> Disable BTRFS when 256K page size is selected. > >> > > > > We’ll have other subpage blocksize concerns with 256K pages, but this BTRFS_MAX_COMPRESSED #define is arbitrary. It’s just trying to have an upper bound on the amount of memory we’ll need to uncompress a single page’s worth of random reads. > > > > We could change it to max(PAGE_SIZE, 128K) or just bump to 256K. > > > > But if 256K is problematic in other ways, is it worth bumping BTRFS_MAX_COMPRESSED to 256K ? > > David, in below mail, said that 256K support would require deaper changes. So disabling BTRFS > support seems the easiest solution for the time being, at least for Stable (I forgot the Fixes: tag > and the CC: to stable). > > On powerpc, 256k pages is a corner case, it requires customised binutils, so I don't think disabling > BTRFS is a issue there. For hexagon I don't know. That it blew up due to the max compressed size is a coincidence. We could have explicit BUILD_BUG_ONs for page size or other constraints derived from the page size like INLINE_EXTENT_BUFFER_PAGES. And there's no such thing like "just bump BTRFS_MAX_COMPRESSED to 256K". The constant is part of on-disk format for lzo and otherwise changing it would impact performance so this would need proper evaluation.