aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-03-02 10:27:46 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-03-02 10:27:46 -0500
commit1ac6466f253ef7bd063b7877fb056afe1820841c (patch)
tree8202e2ba849b72236ea186cfbfd4c4098aa7d699 /fs/ext4/ext4.h
parent246307745c406379996e6ed6411f0e20f1ce1449 (diff)
ext4: use percpu counter for extent cache count
Use a percpu counter rather than atomic types for shrinker accounting. There's no need for ultimate accuracy in the shrinker, so this should come a little more cheaply. The percpu struct is somewhat large, but there was a big gap before the cache-aligned s_es_lru_lock anyway, and it fits nicely in there. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 96c10934bb96..4a01ba315262 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1268,7 +1268,6 @@ struct ext4_sb_info {
1268 atomic_t s_mb_preallocated; 1268 atomic_t s_mb_preallocated;
1269 atomic_t s_mb_discarded; 1269 atomic_t s_mb_discarded;
1270 atomic_t s_lock_busy; 1270 atomic_t s_lock_busy;
1271 atomic_t s_extent_cache_cnt;
1272 1271
1273 /* locality groups */ 1272 /* locality groups */
1274 struct ext4_locality_group __percpu *s_locality_groups; 1273 struct ext4_locality_group __percpu *s_locality_groups;
@@ -1310,6 +1309,7 @@ struct ext4_sb_info {
1310 /* Reclaim extents from extent status tree */ 1309 /* Reclaim extents from extent status tree */
1311 struct shrinker s_es_shrinker; 1310 struct shrinker s_es_shrinker;
1312 struct list_head s_es_lru; 1311 struct list_head s_es_lru;
1312 struct percpu_counter s_extent_cache_cnt;
1313 spinlock_t s_es_lru_lock ____cacheline_aligned_in_smp; 1313 spinlock_t s_es_lru_lock ____cacheline_aligned_in_smp;
1314}; 1314};
1315 1315