mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Daniel Vacek <neelx@suse.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: index buffer_tree using node size
Date: Mon, 23 Jun 2025 16:25:02 +0200	[thread overview]
Message-ID: <20250623142501.GA28944@suse.cz> (raw)
In-Reply-To: <CAPjX3FdgS4xJBvvsx9zRxiuRm9=5VcTynmtnidga4gcqewLrUw@mail.gmail.com>

On Mon, Jun 23, 2025 at 04:04:39PM +0200, Daniel Vacek wrote:
> On Fri, 20 Jun 2025 at 14:57, David Sterba <dsterba@suse.cz> wrote:
> >
> > On Thu, Jun 12, 2025 at 10:47:23AM +0200, Daniel Vacek wrote:
> > > So far we are deriving the buffer tree index using the sector size. But each
> > > extent buffer covers multiple sectors. This makes the buffer tree rather sparse.
> > >
> > > For example the typical and quite common configuration uses sector size of 4KiB
> > > and node size of 16KiB. In this case it means the buffer tree is using up to
> > > the maximum of 25% of it's slots. Or in other words at least 75% of the tree
> > > slots are wasted as never used.
> > >
> > > We can score significant memory savings on the required tree nodes by indexing
> > > the tree using the node size instead. As a result far less slots are wasted
> > > and the tree can now use up to all 100% of it's slots this way.
> > >
> > > Note: This works even with unaligned tree blocks as we can still get unique
> > >       index by doing eb->start >> nodesize_shift.
> >
> > Can we have at least some numbers? As we've talked about it and you
> > showed me the number of radix nodes or other internal xarray structures
> > before/after.
> 
> The numbers are in this email thread. Do you mean to put them directly
> into the commit message?

Yes, it's relevant information and part of why the patch is done. Mails
are for discussion, for permanent stoarge we want it in changelog in a
presentable form.

  reply	other threads:[~2025-06-23 14:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 17:23 [PATCH] " Daniel Vacek
2025-05-12 20:20 ` David Sterba
2025-05-13  7:56   ` Daniel Vacek
2025-05-13  8:08     ` Daniel Vacek
2025-05-13 17:10     ` David Sterba
2025-05-14  9:55       ` Daniel Vacek
2025-05-12 22:44 ` Qu Wenruo
2025-05-13  8:05   ` Daniel Vacek
2025-05-13  8:10     ` Qu Wenruo
2025-05-13 10:12 ` Filipe Manana
2025-05-13 14:37   ` Daniel Vacek
2025-06-06 17:28 ` David Sterba
2025-06-12  8:34   ` Daniel Vacek
2025-06-12  8:47 ` [PATCH v2] " Daniel Vacek
2025-06-20 12:57   ` David Sterba
2025-06-23 14:04     ` Daniel Vacek
2025-06-23 14:25       ` David Sterba [this message]
2025-07-04 16:09         ` Daniel Vacek

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=20250623142501.GA28944@suse.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neelx@suse.com \
    --cc=wqu@suse.com \
    /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

all inboxes | Powered by JetHome®