aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 37498ef61548..d556cd829af6 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -34,6 +34,7 @@
34#include <linux/syscalls.h> 34#include <linux/syscalls.h>
35#include <linux/buffer_head.h> 35#include <linux/buffer_head.h>
36#include <linux/pagevec.h> 36#include <linux/pagevec.h>
37#include <trace/events/writeback.h>
37 38
38/* 39/*
39 * After a CPU has dirtied this many pages, balance_dirty_pages_ratelimited 40 * After a CPU has dirtied this many pages, balance_dirty_pages_ratelimited
@@ -535,11 +536,13 @@ static void balance_dirty_pages(struct address_space *mapping,
535 * threshold otherwise wait until the disk writes catch 536 * threshold otherwise wait until the disk writes catch
536 * up. 537 * up.
537 */ 538 */
539 trace_wbc_balance_dirty_start(&wbc, bdi);
538 if (bdi_nr_reclaimable > bdi_thresh) { 540 if (bdi_nr_reclaimable > bdi_thresh) {
539 writeback_inodes_wb(&bdi->wb, &wbc); 541 writeback_inodes_wb(&bdi->wb, &wbc);
540 pages_written += write_chunk - wbc.nr_to_write; 542 pages_written += write_chunk - wbc.nr_to_write;
541 get_dirty_limits(&background_thresh, &dirty_thresh, 543 get_dirty_limits(&background_thresh, &dirty_thresh,
542 &bdi_thresh, bdi); 544 &bdi_thresh, bdi);
545 trace_wbc_balance_dirty_written(&wbc, bdi);
543 } 546 }
544 547
545 /* 548 /*
@@ -565,6 +568,7 @@ static void balance_dirty_pages(struct address_space *mapping,
565 if (pages_written >= write_chunk) 568 if (pages_written >= write_chunk)
566 break; /* We've done our duty */ 569 break; /* We've done our duty */
567 570
571 trace_wbc_balance_dirty_wait(&wbc, bdi);
568 __set_current_state(TASK_INTERRUPTIBLE); 572 __set_current_state(TASK_INTERRUPTIBLE);
569 io_schedule_timeout(pause); 573 io_schedule_timeout(pause);
570 574