From: David Sterba <dsterba@suse.cz>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: reduce ordered_extent_lock section at btrfs_split_ordered_extent()
Date: Wed, 29 May 2024 00:22:52 +0200 [thread overview]
Message-ID: <20240528222252.GJ8631@twin.jikos.cz> (raw)
In-Reply-To: <6bd1663678f119791c1e2b6071f4973f35dcf049.1715708811.git.fdmanana@suse.com>
On Tue, May 14, 2024 at 06:54:18PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> There's no need to hold the root's ordered_extent_lock for so long at
> btrfs_split_ordered_extent(). We don't need to hold it in order to modify
> the inode's rb tree of ordered extents, to modify the trimmed ordered
> extent and move checksums between the trimmed and the new ordered extent.
> That's only increasing contention of the root's ordered_extent_lock for
> other writes that are starting or completing.
>
> So lock the root's ordered_extent_lock only before we add the new ordered
> extent to the root's ordered list and increment the root's counter for the
> number of ordered extents.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
next prev parent reply other threads:[~2024-05-28 22:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 14:28 [PATCH] btrfs: reduce ordered_extent_lock section at btrfs_split_ordered_extent() fdmanana
2024-05-14 17:54 ` [PATCH v2] " fdmanana
2024-05-28 22:22 ` David Sterba [this message]
2024-05-29 11:51 ` Filipe Manana
2024-05-29 15:16 ` 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=20240528222252.GJ8631@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