Skip to content

Commit 9cd70b3

Browse files
committed
ext4: address scalability issue by removing extent cache statistics
Andi Kleen and Tim Chen have reported that under certain circumstances the extent cache statistics are causing scalability problems due to cache line bounces. Signed-off-by: "Theodore Ts'o" <[email protected]> Cc: [email protected]
1 parent 0034102 commit 9cd70b3

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

fs/ext4/ext4.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,9 +1203,6 @@ struct ext4_sb_info {
12031203
unsigned long s_ext_blocks;
12041204
unsigned long s_ext_extents;
12051205
#endif
1206-
/* ext4 extent cache stats */
1207-
unsigned long extent_cache_hits;
1208-
unsigned long extent_cache_misses;
12091206

12101207
/* for buddy allocator */
12111208
struct ext4_group_info ***s_group_info;

fs/ext4/extents.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,10 +2066,6 @@ static int ext4_ext_check_cache(struct inode *inode, ext4_lblk_t block,
20662066
ret = 1;
20672067
}
20682068
errout:
2069-
if (!ret)
2070-
sbi->extent_cache_misses++;
2071-
else
2072-
sbi->extent_cache_hits++;
20732069
trace_ext4_ext_in_cache(inode, block, ret);
20742070
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
20752071
return ret;

fs/ext4/super.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,18 +2366,6 @@ static ssize_t lifetime_write_kbytes_show(struct ext4_attr *a,
23662366
EXT4_SB(sb)->s_sectors_written_start) >> 1)));
23672367
}
23682368

2369-
static ssize_t extent_cache_hits_show(struct ext4_attr *a,
2370-
struct ext4_sb_info *sbi, char *buf)
2371-
{
2372-
return snprintf(buf, PAGE_SIZE, "%lu\n", sbi->extent_cache_hits);
2373-
}
2374-
2375-
static ssize_t extent_cache_misses_show(struct ext4_attr *a,
2376-
struct ext4_sb_info *sbi, char *buf)
2377-
{
2378-
return snprintf(buf, PAGE_SIZE, "%lu\n", sbi->extent_cache_misses);
2379-
}
2380-
23812369
static ssize_t inode_readahead_blks_store(struct ext4_attr *a,
23822370
struct ext4_sb_info *sbi,
23832371
const char *buf, size_t count)
@@ -2435,8 +2423,6 @@ static struct ext4_attr ext4_attr_##name = __ATTR(name, mode, show, store)
24352423
EXT4_RO_ATTR(delayed_allocation_blocks);
24362424
EXT4_RO_ATTR(session_write_kbytes);
24372425
EXT4_RO_ATTR(lifetime_write_kbytes);
2438-
EXT4_RO_ATTR(extent_cache_hits);
2439-
EXT4_RO_ATTR(extent_cache_misses);
24402426
EXT4_ATTR_OFFSET(inode_readahead_blks, 0644, sbi_ui_show,
24412427
inode_readahead_blks_store, s_inode_readahead_blks);
24422428
EXT4_RW_ATTR_SBI_UI(inode_goal, s_inode_goal);
@@ -2452,8 +2438,6 @@ static struct attribute *ext4_attrs[] = {
24522438
ATTR_LIST(delayed_allocation_blocks),
24532439
ATTR_LIST(session_write_kbytes),
24542440
ATTR_LIST(lifetime_write_kbytes),
2455-
ATTR_LIST(extent_cache_hits),
2456-
ATTR_LIST(extent_cache_misses),
24572441
ATTR_LIST(inode_readahead_blks),
24582442
ATTR_LIST(inode_goal),
24592443
ATTR_LIST(mb_stats),

0 commit comments

Comments
 (0)