diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2014-11-25 17:45:37 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-11-25 17:45:37 +0100 |
commit | edaa53cac8fd4b96ed4b8f96c4933158ff2dd337 (patch) | |
tree | f414417ca79fe9678743ea5af75bd5afb70ad8cd /fs/ext4/extents.c | |
parent | ext4: cache extent hole in extent status tree for ext4_da_map_blocks() (diff) | |
download | linux-edaa53cac8fd4b96ed4b8f96c4933158ff2dd337.tar.xz linux-edaa53cac8fd4b96ed4b8f96c4933158ff2dd337.zip |
ext4: change LRU to round-robin in extent status tree shrinker
In this commit we discard the lru algorithm for inodes with extent
status tree because it takes significant effort to maintain a lru list
in extent status tree shrinker and the shrinker can take a long time to
scan this lru list in order to reclaim some objects.
We replace the lru ordering with a simple round-robin. After that we
never need to keep a lru list. That means that the list needn't be
sorted if the shrinker can not reclaim any objects in the first round.
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 1ee24d74270f..e406f66a903f 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4632,7 +4632,7 @@ out2: trace_ext4_ext_map_blocks_exit(inode, flags, map, err ? err : allocated); - ext4_es_lru_add(inode); + ext4_es_list_add(inode); return err ? err : allocated; } @@ -5191,7 +5191,7 @@ int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, error = ext4_fill_fiemap_extents(inode, start_blk, len_blks, fieinfo); } - ext4_es_lru_add(inode); + ext4_es_list_add(inode); return error; } |