From: Chris Mason Date: Fri, 7 Aug 2009 13:59:15 +0000 (-0400) Subject: Btrfs: tweak congestion backoff X-Git-Tag: v2.6.32-rc4~7^2~47^2~10 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=57fd5a5ff8b48b99e90b22fc143082aba755c6c0;p=safe%2Fjmp%2Flinux-2.6 Btrfs: tweak congestion backoff The btrfs io submission thread tries to back off congested devices in favor of rotating off to another disk. But, it tries to make sure it submits at least some IO before rotating on (the others may be congested too), and so it has a magic number of requests it tries to write before it hops. This makes the magic number smaller. Testing shows that we're spending too much time on congested devices and leaving the other devices idle. Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 5dbefd1..a7e5377 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -276,7 +276,7 @@ loop_lock: * is now congested. Back off and let other work structs * run instead */ - if (pending && bdi_write_congested(bdi) && batch_run > 32 && + if (pending && bdi_write_congested(bdi) && batch_run > 8 && fs_info->fs_devices->open_devices > 1) { struct io_context *ioc;