aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorZheng Liu <wenqing.lz@taobao.com>2014-11-25 11:45:37 -0500
committerTheodore Ts'o <tytso@mit.edu>2014-11-25 11:45:37 -0500
commitedaa53cac8fd4b96ed4b8f96c4933158ff2dd337 (patch)
treef414417ca79fe9678743ea5af75bd5afb70ad8cd /include/trace
parent2f8e0a7c6c89f850ebd5d6c0b9a08317030d1b89 (diff)
ext4: change LRU to round-robin in extent status tree shrinker
In this commit we discard the lru algorithm for inodes with extent status tree because it takes significant effort to maintain a lru list in extent status tree shrinker and the shrinker can take a long time to scan this lru list in order to reclaim some objects. We replace the lru ordering with a simple round-robin. After that we never need to keep a lru list. That means that the list needn't be sorted if the shrinker can not reclaim any objects in the first round. Cc: Andreas Dilger <adilger.kernel@dilger.ca> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/ext4.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index cd37a584ee88..6cfb841fea7c 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -2450,15 +2450,14 @@ TRACE_EVENT(ext4_collapse_range,
2450 2450
2451TRACE_EVENT(ext4_es_shrink, 2451TRACE_EVENT(ext4_es_shrink,
2452 TP_PROTO(struct super_block *sb, int nr_shrunk, u64 scan_time, 2452 TP_PROTO(struct super_block *sb, int nr_shrunk, u64 scan_time,
2453 int skip_precached, int nr_skipped, int retried), 2453 int nr_skipped, int retried),
2454 2454
2455 TP_ARGS(sb, nr_shrunk, scan_time, skip_precached, nr_skipped, retried), 2455 TP_ARGS(sb, nr_shrunk, scan_time, nr_skipped, retried),
2456 2456
2457 TP_STRUCT__entry( 2457 TP_STRUCT__entry(
2458 __field( dev_t, dev ) 2458 __field( dev_t, dev )
2459 __field( int, nr_shrunk ) 2459 __field( int, nr_shrunk )
2460 __field( unsigned long long, scan_time ) 2460 __field( unsigned long long, scan_time )
2461 __field( int, skip_precached )
2462 __field( int, nr_skipped ) 2461 __field( int, nr_skipped )
2463 __field( int, retried ) 2462 __field( int, retried )
2464 ), 2463 ),
@@ -2467,16 +2466,14 @@ TRACE_EVENT(ext4_es_shrink,
2467 __entry->dev = sb->s_dev; 2466 __entry->dev = sb->s_dev;
2468 __entry->nr_shrunk = nr_shrunk; 2467 __entry->nr_shrunk = nr_shrunk;
2469 __entry->scan_time = div_u64(scan_time, 1000); 2468 __entry->scan_time = div_u64(scan_time, 1000);
2470 __entry->skip_precached = skip_precached;
2471 __entry->nr_skipped = nr_skipped; 2469 __entry->nr_skipped = nr_skipped;
2472 __entry->retried = retried; 2470 __entry->retried = retried;
2473 ), 2471 ),
2474 2472
2475 TP_printk("dev %d,%d nr_shrunk %d, scan_time %llu skip_precached %d " 2473 TP_printk("dev %d,%d nr_shrunk %d, scan_time %llu "
2476 "nr_skipped %d retried %d", 2474 "nr_skipped %d retried %d",
2477 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->nr_shrunk, 2475 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->nr_shrunk,
2478 __entry->scan_time, __entry->skip_precached, 2476 __entry->scan_time, __entry->nr_skipped, __entry->retried)
2479 __entry->nr_skipped, __entry->retried)
2480); 2477);
2481 2478
2482#endif /* _TRACE_EXT4_H */ 2479#endif /* _TRACE_EXT4_H */