summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-05-18 10:41:58 -0400
committerChris Mason <chris.mason@oracle.com>2009-06-10 11:29:48 -0400
commit2c943de6ad795a174dcc424c293bb77f15ae3b8c (patch)
tree15e54377cb925312ce0332a6520d78ae99b9fafc /fs/btrfs
parentcfbb9308463f6dad1334884db046ccf0f1a77918 (diff)
downloadblackbird-op-linux-2c943de6ad795a174dcc424c293bb77f15ae3b8c.tar.gz
blackbird-op-linux-2c943de6ad795a174dcc424c293bb77f15ae3b8c.zip
Btrfs: reduce mount -o ssd CPU usage
The block allocator in SSD mode will try to find groups of free blocks that are close together. This commit makes it loop less on a given group size before bumping it. The end result is that we are less likely to fill small holes in the available free space, but we don't waste as much CPU building the large cluster used by ssd mode. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/free-space-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 0bc93657b460..280165581c57 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -652,7 +652,7 @@ again:
last = entry;
max_extent = 0;
total_retries++;
- if (total_retries % 256 == 0) {
+ if (total_retries % 64 == 0) {
if (min_bytes >= (bytes + empty_size)) {
ret = -ENOSPC;
goto out;
OpenPOWER on IntegriCloud