diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
commit | 2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch) | |
tree | f8b3ee40674ce4acd5508a0a0bf52a30904caf6c /mm/page-writeback.c | |
parent | 7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff) | |
parent | de75d60d5ea235e6e09f4962ab22541ce0fe176a (diff) |
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
xen-blkfront: fix missing out label
blkdev: fix blkdev_issue_zeroout return value
block: update request stacking methods to support discards
block: fix missing export of blk_types.h
writeback: fix bad _bh spinlock nesting
drbd: revert "delay probes", feature is being re-implemented differently
drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
drbd: Disable delay probes for the upcomming release
writeback: cleanup bdi_register
writeback: add new tracepoints
writeback: remove unnecessary init_timer call
writeback: optimize periodic bdi thread wakeups
writeback: prevent unnecessary bdi threads wakeups
writeback: move bdi threads exiting logic to the forker thread
writeback: restructure bdi forker loop a little
writeback: move last_active to bdi
writeback: do not remove bdi from bdi_list
writeback: simplify bdi code a little
writeback: do not lose wake-ups in bdi threads
...
Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index df8202ebc7b8..0c6258bd1ba3 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 | ||
@@ -962,6 +966,7 @@ continue_unlock: | |||
962 | if (!clear_page_dirty_for_io(page)) | 966 | if (!clear_page_dirty_for_io(page)) |
963 | goto continue_unlock; | 967 | goto continue_unlock; |
964 | 968 | ||
969 | trace_wbc_writepage(wbc, mapping->backing_dev_info); | ||
965 | ret = (*writepage)(page, wbc, data); | 970 | ret = (*writepage)(page, wbc, data); |
966 | if (unlikely(ret)) { | 971 | if (unlikely(ret)) { |
967 | if (ret == AOP_WRITEPAGE_ACTIVATE) { | 972 | if (ret == AOP_WRITEPAGE_ACTIVATE) { |