diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-03-02 10:27:46 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-03-02 10:27:46 -0500 |
commit | 1ac6466f253ef7bd063b7877fb056afe1820841c (patch) | |
tree | 8202e2ba849b72236ea186cfbfd4c4098aa7d699 /fs/ext4/ext4.h | |
parent | 246307745c406379996e6ed6411f0e20f1ce1449 (diff) | |
download | op-kernel-dev-1ac6466f253ef7bd063b7877fb056afe1820841c.zip op-kernel-dev-1ac6466f253ef7bd063b7877fb056afe1820841c.tar.gz |
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 96c1093..4a01ba3 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1268,7 +1268,6 @@ 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; @@ -1310,6 +1309,7 @@ struct ext4_sb_info { /* Reclaim extents from extent status tree */ struct shrinker s_es_shrinker; struct list_head s_es_lru; + struct percpu_counter s_extent_cache_cnt; spinlock_t s_es_lru_lock ____cacheline_aligned_in_smp; }; |