From: David Sterba <dsterba@suse.cz>
To: Sasha Levin <sashal@kernel.org>
Cc: "David Sterba" <dsterba@suse.com>,
stable@vger.kernel.org, "Josef Bacik" <josef@toxicpanda.com>,
"René Rebe" <rene@exactcode.de>
Subject: Re: [PATCH for 5.10.x] btrfs: shrink delalloc pages instead of full inodes
Date: Fri, 15 Jan 2021 18:09:39 +0100 [thread overview]
Message-ID: <20210115170939.GI6430@suse.cz> (raw)
In-Reply-To: <20210115005956.GV4035784@sasha-vm>
On Thu, Jan 14, 2021 at 07:59:56PM -0500, Sasha Levin wrote:
> On Thu, Jan 14, 2021 at 03:34:30PM +0100, David Sterba wrote:
> >From: Josef Bacik <josef@toxicpanda.com>
> >
> >commit e076ab2a2ca70a0270232067cd49f76cd92efe64 upstream.
> >
> >Commit 38d715f494f2 ("btrfs: use btrfs_start_delalloc_roots in
> >shrink_delalloc") cleaned up how we do delalloc shrinking by utilizing
> >some infrastructure we have in place to flush inodes that we use for
> >device replace and snapshot. However this introduced a pretty serious
> >performance regression. To reproduce the user untarred the source
> >tarball of Firefox (360MiB xz compressed/1.5GiB uncompressed), and would
> >see it take anywhere from 5 to 20 times as long to untar in 5.10
> >compared to 5.9. This was observed on fast devices (SSD and better) and
> >not on HDD.
> >
> >The root cause is because before we would generally use the normal
> >writeback path to reclaim delalloc space, and for this we would provide
> >it with the number of pages we wanted to flush. The referenced commit
> >changed this to flush that many inodes, which drastically increased the
> >amount of space we were flushing in certain cases, which severely
> >affected performance.
> >
> >We cannot revert this patch unfortunately because of 3d45f221ce62
> >("btrfs: fix deadlock when cloning inline extent and low on free
> >metadata space") which requires the ability to skip flushing inodes that
> >are being cloned in certain scenarios, which means we need to keep using
> >our flushing infrastructure or risk re-introducing the deadlock.
>
> But we don't have 3d45f221ce62 in 5.10, which in turn makes me wonder
> why, as it's tagged for stable.
That commit prevents a revert as a fix, that would be otherwise
considered. The fix for 5.11 also works on 5.10.
>
> Instead of the backport, I'm going to take:
>
> e076ab2a2ca7 ("btrfs: shrink delalloc pages instead of full inodes")
> 3d45f221ce62 ("btrfs: fix deadlock when cloning inline extent and low on free metadata space")
That was tagged for stable so ok.
> f2f121ab500d ("btrfs: skip unnecessary searches for xattrs when logging an inode")
>
> which deals with that missing stable tagged commit too.
Why this one? It's not CCed for stable nor has a Fixes: tag and I don't
see it referenced in any of the above patches as a dependency.
prev parent reply other threads:[~2021-01-15 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 14:34 [PATCH for 5.10.x] btrfs: shrink delalloc pages instead of full inodes David Sterba
2021-01-15 0:59 ` Sasha Levin
2021-01-15 17:09 ` David Sterba [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=20210115170939.GI6430@suse.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=rene@exactcode.de \
--cc=sashal@kernel.org \
--cc=stable@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.