summaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-02-22 12:33:03 -0500
committerTheodore Ts'o <tytso@mit.edu>2016-02-22 12:33:03 -0500
commitc2f3140fe2eceb3a6c1615b2648b9471544881c6 (patch)
tree40c4db4b8b362496ef6365bb676cd3591e4de485 /fs/ext2
parentecd1e64412d5242b8afdef58a714bab3c5464f79 (diff)
downloadlwn-c2f3140fe2eceb3a6c1615b2648b9471544881c6.tar.gz
lwn-c2f3140fe2eceb3a6c1615b2648b9471544881c6.zip
mbcache2: limit cache size
So far number of entries in mbcache is limited only by the pressure from the shrinker. Since too many entries degrade the hash table and generally we expect that caching more entries has diminishing returns, limit number of entries the same way as in the old mbcache to 16 * hash table size. Once we exceed the desired maximum number of entries, we schedule a backround work to reclaim entries. If the background work cannot keep up and the number of entries exceeds two times the desired maximum, we reclaim some entries directly when allocating a new entry. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext2')
0 files changed, 0 insertions, 0 deletions