]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: only clamp the first time we have to start flushing
authorJosef Bacik <josef@toxicpanda.com>
Wed, 28 Apr 2021 17:38:43 +0000 (13:38 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:04 +0000 (15:19 +0200)
commitf27b620e13e38d428c91d81f21355e74faeeabd5
treee6a5c16f02bdc946564bf78af9778cd8618932c7
parentbbd04fc320ed468b66f70414c570ec8dcbe9022c
btrfs: only clamp the first time we have to start flushing

We were clamping the threshold for preemptive reclaim any time we added
a ticket to wait on, which if we have a lot of threads means we'd
essentially max out the clamp the first time we start to flush.

Instead of doing this, simply do it every time we have to start
flushing, this will make us ramp up gradually instead of going to max
clamping as soon as we start needing to do flushing.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c