1
0

ext4: optimize ext4_es_shrink()

When the system is under memory pressure, ext4_es_srhink() will get
called very often.  So optimize returning the number of items in the
file system's extent status cache by keeping a per-filesystem count,
instead of calculating it each time by scanning all of the inodes in
the extent status cache.

Also rename the slab used for the extent status cache to be
"ext4_extent_status" so it's obviousl the slab in question is created
by ext4.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Zheng Liu <gnehzuil.liu@gmail.com>
Este cometimento está contido em:
Theodore Ts'o
2013-02-28 23:58:56 -05:00
ascendente 8e919d1304
cometimento 246307745c
3 ficheiros modificados com 26 adições e 54 eliminações

Ver ficheiro

@@ -1268,6 +1268,7 @@ struct ext4_sb_info {
atomic_t s_mb_preallocated;
atomic_t s_mb_discarded;
atomic_t s_lock_busy;
atomic_t s_extent_cache_cnt;
/* locality groups */
struct ext4_locality_group __percpu *s_locality_groups;