]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: do not do preemptive flushing if the majority is global rsv
authorJosef Bacik <josef@toxicpanda.com>
Wed, 11 Aug 2021 18:37:16 +0000 (14:37 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:16 +0000 (13:19 +0200)
commit4dcc25050e49b55cd7363d7497fa46ffaa6fab21
treeed7b3ddb0b573ce220319063f38262230049af93
parentf999848dc91108b50ba50de751d355bc22870c27
btrfs: do not do preemptive flushing if the majority is global rsv

A common characteristic of the bug report where preemptive flushing was
going full tilt was the fact that the vast majority of the free metadata
space was used up by the global reserve.  The hard 90% threshold would
cover the majority of these cases, but to be even smarter we should take
into account how much of the outstanding reservations are covered by the
global block reserve.  If the global block reserve accounts for the vast
majority of outstanding reservations, skip preemptive flushing, as it
will likely just cause churn and pain.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212185
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c