From: David Sterba <dsterba@suse.cz>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 00/20] btrfs: remove plenty of redundant btrfs_mark_buffer_dirty() calls
Date: Mon, 23 Dec 2024 21:08:59 +0100 [thread overview]
Message-ID: <20241223200859.GN31418@twin.jikos.cz> (raw)
In-Reply-To: <cover.1734527445.git.fdmanana@suse.com>
On Wed, Dec 18, 2024 at 05:06:27PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> There's quite a lot of places calling btrfs_mark_buffer_dirty() when it
> is not necessary because we already have a path setup for writing, due
> to calls to btrfs_search_slot() with a 'cow' argument having a value of 1
> or anything that calls btrfs_search_slot() that way (and it's obvious
> from the context). These make the code more verbose, add some overhead
> and increase the module's text size unnecessarily. This patchset removes
> such unnecessary calls. Often people keep adding them because they copy
> the approach done from such places.
I've read the explict calls to btrfs_mark_buffer_dirty() as source-level
marker of the section pairing btrfs_search_slot(). There are also some
assertions and eb state checks that were done in set_extent_buffer_dirty(),
now we're losing them.
While the code gets reduced and the calls may be redundant for some
reasons I think we should keep something at least to do the assertions,
or eventually optimize btrfs_mark_buffer_dirty() to be faster if the
path is set up by the search slot with cow=1.
next prev parent reply other threads:[~2024-12-23 20:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 17:06 [PATCH 00/20] btrfs: remove plenty of redundant btrfs_mark_buffer_dirty() calls fdmanana
2024-12-18 17:06 ` [PATCH 01/20] btrfs: tree-log: remove unnecessary calls to btrfs_mark_buffer_dirty() fdmanana
2024-12-18 17:06 ` [PATCH 02/20] btrfs: free-space-tree: " fdmanana
2024-12-18 17:06 ` [PATCH 03/20] btrfs: extent-tree: " fdmanana
2024-12-18 17:06 ` [PATCH 04/20] btrfs: block-group: " fdmanana
2024-12-18 17:06 ` [PATCH 05/20] btrfs: delayed-inode: remove unnecessary call " fdmanana
2024-12-18 17:06 ` [PATCH 06/20] btrfs: dev-replace: " fdmanana
2024-12-18 17:06 ` [PATCH 07/20] btrfs: dir-item: remove unnecessary calls " fdmanana
2024-12-18 17:06 ` [PATCH 08/20] btrfs: file: " fdmanana
2024-12-18 17:06 ` [PATCH 09/20] btrfs: file-item: " fdmanana
2024-12-18 17:06 ` [PATCH 10/20] btrfs: free-space-cache: " fdmanana
2024-12-18 17:06 ` [PATCH 11/20] btrfs: inode: " fdmanana
2024-12-18 17:06 ` [PATCH 12/20] btrfs: inode-item: " fdmanana
2024-12-18 17:06 ` [PATCH 13/20] btrfs: ioctl: remove unnecessary call " fdmanana
2024-12-18 17:06 ` [PATCH 14/20] btrfs: qgroup: remove unnecessary calls " fdmanana
2024-12-18 17:06 ` [PATCH 15/20] btrfs: raid-stripe-tree: remove unnecessary call " fdmanana
2024-12-18 17:06 ` [PATCH 16/20] btrfs: relocation: remove unnecessary calls " fdmanana
2024-12-18 17:06 ` [PATCH 17/20] btrfs: root-tree: " fdmanana
2024-12-18 17:06 ` [PATCH 18/20] btrfs: uuid-tree: remove unnecessary call " fdmanana
2024-12-18 17:06 ` [PATCH 19/20] btrfs: volumes: remove unnecessary calls " fdmanana
2024-12-18 17:06 ` [PATCH 20/20] btrfs: xattr: remove unnecessary call " fdmanana
2024-12-19 7:43 ` [PATCH 00/20] btrfs: remove plenty of redundant btrfs_mark_buffer_dirty() calls Johannes Thumshirn
2024-12-23 20:08 ` David Sterba [this message]
2025-01-06 10:54 ` Filipe Manana
2025-01-06 14:19 ` David Sterba
2025-01-06 15:43 ` Filipe Manana
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=20241223200859.GN31418@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@kernel.org \
--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