linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH 0/2] Preemptive flushing fixes
Date: Wed, 11 Aug 2021 14:37:14 -0400	[thread overview]
Message-ID: <cover.1628706812.git.josef@toxicpanda.com> (raw)

Hello,

I thought I had fixed the preemptive flushing burning CPU's problem with my
previous set of fixes, but I was wrong.  However those tracepoints gave me the
information I needed to fix the problem properly.  The first patch

btrfs: reduce the preemptive flushing threshold to 90%

can go back to stable and make its way into the distros to stop the pain for the
current users having problems.  The second patch augments the fix with a little
less of a strong hammer.

The problem is for very full file systems on slower disks will end up with a
very small threshold to start preemptive flushing.  We were relying on sanity
checks to bail out ahead of time, however they were not strong enough.  These
problematic cases existed in the short area where there was enough space to
operate without needing to do synchronous flushing, but not enough space to
avoid flushing all of the time.

The fix is to adjust the sanity checks to something more reasonable to account
for these cases and avoid spinning doing preemptive flushing constantly.
Thanks,

Josef

Josef Bacik (2):
  btrfs: reduce the preemptive flushing threshold to 90%
  btrfs: do not do preemptive flushing if the majority is global rsv

 fs/btrfs/space-info.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

-- 
2.26.3


             reply	other threads:[~2021-08-11 18:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 18:37 Josef Bacik [this message]
2021-08-11 18:37 ` [PATCH 1/2] btrfs: reduce the preemptive flushing threshold to 90% Josef Bacik
2021-08-11 18:37 ` [PATCH 2/2] btrfs: do not do preemptive flushing if the majority is global rsv Josef Bacik
2021-08-17  8:39   ` Nikolay Borisov
2021-08-16 13:55 ` [PATCH 0/2] Preemptive flushing fixes 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.1628706812.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.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;
as well as URLs for NNTP newsgroup(s).