]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: optimize ext4_es_shrink()
authorTheodore Ts'o <tytso@mit.edu>
Fri, 1 Mar 2013 04:58:56 +0000 (23:58 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 1 Mar 2013 04:58:56 +0000 (23:58 -0500)
commitaead680176f42576febc72aeeef06e9127aee384
tree71b78d765ba7406c6755cad807944da6a99e5980
parent32f13dbe968c7f422c68f3eaf3c059cd346c71b0
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>
fs/ext4/ext4.h
fs/ext4/extents_status.c
include/trace/events/ext4.h