From: Boris Burkov <boris@bur.io>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/7] Set/get accessor speedups
Date: Wed, 2 Jul 2025 11:54:40 -0700 [thread overview]
Message-ID: <20250702185440.GD2308047@zen.localdomain> (raw)
In-Reply-To: <cover.1751390044.git.dsterba@suse.com>
On Tue, Jul 01, 2025 at 07:23:47PM +0200, David Sterba wrote:
> Followup to [1] bringing refactoring that allows compiler to do more
> optimizations and stack usage reduction. As the set/get helpers are
> heavily used in many functions this improves performance. I will provide
> some numbers later as I've done mostly functional tests. During the
> development I've identified a few more possible optimizations to improve
> performance, but this series is OK as is.
>
> Overall effects of this series:
>
> Stack:
>
> btrfs_set_16 -72 (88 -> 16)
> btrfs_get_32 -56 (80 -> 24)
> btrfs_set_8 -72 (88 -> 16)
> btrfs_set_64 -64 (88 -> 24)
> btrfs_get_8 -72 (80 -> 8)
> btrfs_get_16 -64 (80 -> 16)
> btrfs_set_32 -64 (88 -> 24)
> btrfs_get_64 -56 (80 -> 24)
>
> NEW (48):
> report_setget_bounds 48
> LOST/NEW DELTA: +48
> PRE/POST DELTA: -472
>
> Code:
>
> text data bss dec hex filename
> 1456601 115665 16088 1588354 183c82 pre/btrfs.ko
> 1454229 115665 16088 1585982 18333e post/btrfs.ko
>
> DELTA: -2372
I sent some minor inline questions / suggestions, but overall this looks
great and each patch makes a good deal of sense on its own.
Reviewed-by: Boris Burkov <boris@bur.io>
>
> [1] https://lore.kernel.org/linux-btrfs/cover.1751032655.git.dsterba@suse.com/
>
> David Sterba (7):
> btrfs: accessors: simplify folio bounds checks
> btrfs: accessors: use type sizeof constants directly
> btrfs: accessors: inline eb bounds check and factor out the error
> report
> btrfs: accessors: compile-time fast path for u8
> btrfs: accessors: compile-time fast path for u16
> btrfs: accessors: set target address at initialization
> btrfs: accessors: factor out split memcpy with two sources
>
> fs/btrfs/accessors.c | 84 +++++++++++++++++++++++++++-----------------
> 1 file changed, 51 insertions(+), 33 deletions(-)
>
> --
> 2.49.0
>
prev parent reply other threads:[~2025-07-02 18:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 17:23 [PATCH 0/7] Set/get accessor speedups David Sterba
2025-07-01 17:23 ` [PATCH 1/7] btrfs: accessors: simplify folio bounds checks David Sterba
2025-07-01 17:23 ` [PATCH 2/7] btrfs: accessors: use type sizeof constants directly David Sterba
2025-07-02 17:58 ` Boris Burkov
2025-07-03 21:20 ` David Sterba
2025-07-07 14:25 ` David Sterba
2025-07-01 17:23 ` [PATCH 3/7] btrfs: accessors: inline eb bounds check and factor out the error report David Sterba
2025-07-02 18:00 ` Boris Burkov
2025-07-03 21:16 ` David Sterba
2025-07-01 17:23 ` [PATCH 4/7] btrfs: accessors: compile-time fast path for u8 David Sterba
2025-07-01 17:23 ` [PATCH 5/7] btrfs: accessors: compile-time fast path for u16 David Sterba
2025-07-01 17:23 ` [PATCH 6/7] btrfs: accessors: set target address at initialization David Sterba
2025-07-01 17:23 ` [PATCH 7/7] btrfs: accessors: factor out split memcpy with two sources David Sterba
2025-07-02 18:53 ` Boris Burkov
2025-07-03 20:57 ` David Sterba
2025-07-02 18:54 ` Boris Burkov [this message]
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=20250702185440.GD2308047@zen.localdomain \
--to=boris@bur.io \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox