All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Preemptive flushing fixes
@ 2021-08-11 18:37 Josef Bacik
  2021-08-11 18:37 ` [PATCH 1/2] btrfs: reduce the preemptive flushing threshold to 90% Josef Bacik
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Josef Bacik @ 2021-08-11 18:37 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-17  8:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-11 18:37 [PATCH 0/2] Preemptive flushing fixes Josef Bacik
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

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.