diff options
author | Jan Kara <jack@suse.cz> | 2010-03-29 13:55:39 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-05-21 19:30:37 +0200 |
commit | 46891532370e862d6bddedef9e6ca22a59a51fa4 (patch) | |
tree | 0e4d6128f7f4a1f67d6c3ede3504100ec5d5ee7a /fs/ext2 | |
parent | 8cef107a1d890ff76c85d665083ff3562be01d32 (diff) | |
download | kernel_samsung_crespo-46891532370e862d6bddedef9e6ca22a59a51fa4.zip kernel_samsung_crespo-46891532370e862d6bddedef9e6ca22a59a51fa4.tar.gz kernel_samsung_crespo-46891532370e862d6bddedef9e6ca22a59a51fa4.tar.bz2 |
ext2: Avoid loading bitmaps for full groups during block allocation
There is no point in loading bitmap for groups which are completely full.
This causes noticeable performance problems (and memory pressure) on small
systems with large full filesystem
(http://marc.info/?l=linux-ext4&m=126843108314310&w=2).
Port of the same ext3 patch.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/balloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 3cf038c..e8766a3 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -1332,6 +1332,12 @@ retry_alloc: free_blocks = le16_to_cpu(gdp->bg_free_blocks_count); /* + * skip this group (and avoid loading bitmap) if there + * are no free blocks + */ + if (!free_blocks) + continue; + /* * skip this group if the number of * free blocks is less than half of the reservation * window size. |