aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-09-29 13:31:31 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-09-29 13:31:31 -0400
commit55138e0bc29c0751e2152df9ad35deea542f29b3 (patch)
tree40dbc77de3e7a426030bd740ba8e2fd0d2171523 /include
parent71780577306fd1e76c7a92e3b308db624d03adb9 (diff)
ext4: Adjust ext4_da_writepages() to write out larger contiguous chunks
Work around problems in the writeback code to force out writebacks in larger chunks than just 4mb, which is just too small. This also works around limitations in the ext4 block allocator, which can't allocate more than 2048 blocks at a time. So we need to defeat the round-robin characteristics of the writeback code and try to write out as many blocks in one inode before allowing the writeback code to move on to another inode. We add a a new per-filesystem tunable, max_writeback_mb_bump, which caps this to a default of 128mb per inode. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/ext4.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index c1bd8f1e8b94..7c6bbb7198a3 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -236,6 +236,7 @@ TRACE_EVENT(ext4_da_writepages,
236 __field( char, for_kupdate ) 236 __field( char, for_kupdate )
237 __field( char, for_reclaim ) 237 __field( char, for_reclaim )
238 __field( char, range_cyclic ) 238 __field( char, range_cyclic )
239 __field( pgoff_t, writeback_index )
239 ), 240 ),
240 241
241 TP_fast_assign( 242 TP_fast_assign(
@@ -249,15 +250,17 @@ TRACE_EVENT(ext4_da_writepages,
249 __entry->for_kupdate = wbc->for_kupdate; 250 __entry->for_kupdate = wbc->for_kupdate;
250 __entry->for_reclaim = wbc->for_reclaim; 251 __entry->for_reclaim = wbc->for_reclaim;
251 __entry->range_cyclic = wbc->range_cyclic; 252 __entry->range_cyclic = wbc->range_cyclic;
253 __entry->writeback_index = inode->i_mapping->writeback_index;
252 ), 254 ),
253 255
254 TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d", 256 TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu",
255 jbd2_dev_to_name(__entry->dev), 257 jbd2_dev_to_name(__entry->dev),
256 (unsigned long) __entry->ino, __entry->nr_to_write, 258 (unsigned long) __entry->ino, __entry->nr_to_write,
257 __entry->pages_skipped, __entry->range_start, 259 __entry->pages_skipped, __entry->range_start,
258 __entry->range_end, __entry->nonblocking, 260 __entry->range_end, __entry->nonblocking,
259 __entry->for_kupdate, __entry->for_reclaim, 261 __entry->for_kupdate, __entry->for_reclaim,
260 __entry->range_cyclic) 262 __entry->range_cyclic,
263 (unsigned long) __entry->writeback_index)
261); 264);
262 265
263TRACE_EVENT(ext4_da_write_pages, 266TRACE_EVENT(ext4_da_write_pages,
@@ -309,6 +312,7 @@ TRACE_EVENT(ext4_da_writepages_result,
309 __field( char, encountered_congestion ) 312 __field( char, encountered_congestion )
310 __field( char, more_io ) 313 __field( char, more_io )
311 __field( char, no_nrwrite_index_update ) 314 __field( char, no_nrwrite_index_update )
315 __field( pgoff_t, writeback_index )
312 ), 316 ),
313 317
314 TP_fast_assign( 318 TP_fast_assign(
@@ -320,14 +324,16 @@ TRACE_EVENT(ext4_da_writepages_result,
320 __entry->encountered_congestion = wbc->encountered_congestion; 324 __entry->encountered_congestion = wbc->encountered_congestion;
321 __entry->more_io = wbc->more_io; 325 __entry->more_io = wbc->more_io;
322 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; 326 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
327 __entry->writeback_index = inode->i_mapping->writeback_index;
323 ), 328 ),
324 329
325 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", 330 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu",
326 jbd2_dev_to_name(__entry->dev), 331 jbd2_dev_to_name(__entry->dev),
327 (unsigned long) __entry->ino, __entry->ret, 332 (unsigned long) __entry->ino, __entry->ret,
328 __entry->pages_written, __entry->pages_skipped, 333 __entry->pages_written, __entry->pages_skipped,
329 __entry->encountered_congestion, __entry->more_io, 334 __entry->encountered_congestion, __entry->more_io,
330 __entry->no_nrwrite_index_update) 335 __entry->no_nrwrite_index_update,
336 (unsigned long) __entry->writeback_index)
331); 337);
332 338
333TRACE_EVENT(ext4_da_write_begin, 339TRACE_EVENT(ext4_da_write_begin,