All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 0/2] Allocate eb in 16k an 64k slabs, cache folio address
Date: Thu, 28 Aug 2025 23:53:53 +0200	[thread overview]
Message-ID: <cover.1756417687.git.dsterba@suse.com> (raw)

Optimiztion of eb folio access.

NOTE: does not work with both patches applied, btrfs/002 hangs and I
      don't see why. I'm sending this out in case somebody can spot it.

The extent buffer folio array is not used effectively on 16K node size,
so there are two slabs allocated for the default size and 64k for
everything else. With some pointer magic we can also cache the folio
addresses and this allows object code reduction. Numbers are in the
patches.

David Sterba (2):
  btrfs: add 16K and 64K slabs for extent buffers
  btrfs: use cached extent buffer folio address everywhere

 fs/btrfs/accessors.c | 12 +++---
 fs/btrfs/accessors.h |  5 +--
 fs/btrfs/ctree.c     |  2 +-
 fs/btrfs/disk-io.c   |  6 +--
 fs/btrfs/extent_io.c | 96 ++++++++++++++++++++++++++++++--------------
 fs/btrfs/extent_io.h | 20 ++++++---
 6 files changed, 92 insertions(+), 49 deletions(-)

-- 
2.51.0


             reply	other threads:[~2025-08-28 21:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 21:53 David Sterba [this message]
2025-08-28 21:53 ` [PATCH 1/2] btrfs: add 16K and 64K slabs for extent buffers David Sterba
2025-08-28 22:26   ` Qu Wenruo
2025-08-28 23:17     ` Qu Wenruo
2025-08-28 23:30     ` David Sterba
2025-08-28 23:34       ` Qu Wenruo
2025-08-28 23:45         ` David Sterba
2025-08-28 23:50           ` Qu Wenruo
2025-08-29  0:50             ` David Sterba
2025-08-29  1:07               ` Qu Wenruo
2025-08-28 21:53 ` [PATCH 2/2] btrfs: use cached extent buffer folio address everywhere 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=cover.1756417687.git.dsterba@suse.com \
    --to=dsterba@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.