public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v5 18/19] btrfs-progs: mkfs: create the global root's
Date: Wed, 9 Mar 2022 16:21:52 -0500	[thread overview]
Message-ID: <YikacPd0uY6uozOZ@localhost.localdomain> (raw)
In-Reply-To: <20220309183534.GZ12643@twin.jikos.cz>

On Wed, Mar 09, 2022 at 07:35:34PM +0100, David Sterba wrote:
> On Mon, Mar 07, 2022 at 05:11:03PM -0500, Josef Bacik wrote:
> > Now that we have all of the supporting code, add the ability to create
> > all of the global roots for an extent tree v2 fs.  This will default to
> > nr_cpu's, but also allow the user to specify how many global roots they
> > would like.
> 
> Why is number of online cpus a good default? Or how a user should know
> what's a good number? It resembles the allocation groups on xfs that
> are set at mkfs time and once the filesystem is grown the size remains
> but the number explodes and becomes problematic if the the old/new sizes
> are disproportionate. We have more flexibility in btrfs with the resize
> so we could afford to set the intial number based rather on the device
> size and then a rebalance after resize can adjust that again. Maybe
> there's something in kernel taking care of that, I don't know.

Right now I have no idea what a good number is, so I'm defaulting to NR_CPUS.  I
*think* this is a good idea because generally we want to spread the locking
pain, so hopefully NR_CPU's is good enough for most people?

We allow setting your own number if a user does the benchmarking to find their
ideal global roots number (*cough*Zygo*cough*).  And it'll be easy enough to add
new global roots since we tie the block group to the global root at create time.
Thanks,

Josef

  reply	other threads:[~2022-03-09 21:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 22:10 [PATCH v5 00/19] btrfs-progs: extent tree v2 support, global roots Josef Bacik
2022-03-07 22:10 ` [PATCH v5 01/19] btrfs-progs: add support for loading the block group root Josef Bacik
2022-03-07 22:10 ` [PATCH v5 02/19] btrfs-progs: add print support for the block group tree Josef Bacik
2022-03-07 22:10 ` [PATCH v5 03/19] btrfs-progs: mkfs: use the btrfs_block_group_root helper Josef Bacik
2022-03-07 22:10 ` [PATCH v5 04/19] btrfs-progs: check-lowmem: " Josef Bacik
2022-03-07 22:10 ` [PATCH v5 05/19] btrfs-progs: handle no bg item in extent tree for free space tree Josef Bacik
2022-03-07 22:10 ` [PATCH v5 06/19] btrfs-progs: mkfs: add support for the block group tree Josef Bacik
2022-03-07 22:10 ` [PATCH v5 07/19] btrfs-progs: check: add block group tree support Josef Bacik
2022-03-07 22:10 ` [PATCH v5 08/19] btrfs-progs: qgroup-verify: scan extents based on block groups Josef Bacik
2022-03-07 22:10 ` [PATCH v5 09/19] btrfs-progs: check: make free space tree validation extent tree v2 aware Josef Bacik
2022-03-07 22:10 ` [PATCH v5 10/19] btrfs-progs: check: add helper to reinit the root based on a key Josef Bacik
2022-03-07 22:10 ` [PATCH v5 11/19] btrfs-progs: check: handle the block group tree properly Josef Bacik
2022-03-07 22:10 ` [PATCH v5 12/19] btrfs-progs: set the number of global roots in the super block Josef Bacik
2022-03-08 16:19   ` David Sterba
2022-03-08 16:41     ` Johannes Thumshirn
2022-03-09 17:05       ` David Sterba
2022-03-09 21:22         ` Josef Bacik
2022-06-14 12:15           ` Qu Wenruo
2022-06-14 12:47             ` Qu Wenruo
2022-03-07 22:10 ` [PATCH v5 13/19] btrfs-progs: handle the per-block group global root id Josef Bacik
2022-03-07 22:10 ` [PATCH v5 14/19] btrfs-progs: add a btrfs_delete_and_free_root helper Josef Bacik
2022-03-07 22:11 ` [PATCH v5 15/19] btrfs-progs: make btrfs_clear_free_space_tree extent tree v2 aware Josef Bacik
2022-03-07 22:11 ` [PATCH v5 16/19] btrfs-progs: make btrfs_create_tree take a key for the root key Josef Bacik
2022-03-07 22:11 ` [PATCH v5 17/19] btrfs-progs: mkfs: set chunk_item_objectid properly for extent tree v2 Josef Bacik
2022-03-07 22:11 ` [PATCH v5 18/19] btrfs-progs: mkfs: create the global root's Josef Bacik
2022-03-09 18:35   ` David Sterba
2022-03-09 21:21     ` Josef Bacik [this message]
2022-03-07 22:11 ` [PATCH v5 19/19] btrfs-progs: check: don't do the root item check for extent tree v2 Josef Bacik
2022-03-09 18:48 ` [PATCH v5 00/19] btrfs-progs: extent tree v2 support, global roots David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YikacPd0uY6uozOZ@localhost.localdomain \
    --to=josef@toxicpanda.com \
    --cc=dsterba@suse.cz \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox