diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-08 11:06:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-08 11:06:40 -0400 |
commit | c77e9e68269bf50573ce130b5d95ff6e539dbcf8 (patch) | |
tree | 99edc1b070717e18f5958f934bc3921cfed2ce1f /mm | |
parent | 31016e9941be85e8c487b1f3c45d253eda356715 (diff) | |
parent | 83ba7b071f30f7c01f72518ad72d5cd203c27502 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
writeback: simplify the write back thread queue
writeback: split writeback_inodes_wb
writeback: remove writeback_inodes_wbc
fs-writeback: fix kernel-doc warnings
splice: check f_mode for seekable file
splice: direct_splice_actor() should not use pos in sd
Diffstat (limited to 'mm')
-rw-r--r-- | mm/backing-dev.c | 17 | ||||
-rw-r--r-- | mm/page-writeback.c | 3 |
2 files changed, 5 insertions, 15 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 660a87a22511..123bcef13e51 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -104,15 +104,13 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v) | |||
104 | "b_more_io: %8lu\n" | 104 | "b_more_io: %8lu\n" |
105 | "bdi_list: %8u\n" | 105 | "bdi_list: %8u\n" |
106 | "state: %8lx\n" | 106 | "state: %8lx\n" |
107 | "wb_mask: %8lx\n" | 107 | "wb_list: %8u\n", |
108 | "wb_list: %8u\n" | ||
109 | "wb_cnt: %8u\n", | ||
110 | (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)), | 108 | (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)), |
111 | (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)), | 109 | (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)), |
112 | K(bdi_thresh), K(dirty_thresh), | 110 | K(bdi_thresh), K(dirty_thresh), |
113 | K(background_thresh), nr_wb, nr_dirty, nr_io, nr_more_io, | 111 | K(background_thresh), nr_wb, nr_dirty, nr_io, nr_more_io, |
114 | !list_empty(&bdi->bdi_list), bdi->state, bdi->wb_mask, | 112 | !list_empty(&bdi->bdi_list), bdi->state, |
115 | !list_empty(&bdi->wb_list), bdi->wb_cnt); | 113 | !list_empty(&bdi->wb_list)); |
116 | #undef K | 114 | #undef K |
117 | 115 | ||
118 | return 0; | 116 | return 0; |
@@ -340,14 +338,13 @@ int bdi_has_dirty_io(struct backing_dev_info *bdi) | |||
340 | static void bdi_flush_io(struct backing_dev_info *bdi) | 338 | static void bdi_flush_io(struct backing_dev_info *bdi) |
341 | { | 339 | { |
342 | struct writeback_control wbc = { | 340 | struct writeback_control wbc = { |
343 | .bdi = bdi, | ||
344 | .sync_mode = WB_SYNC_NONE, | 341 | .sync_mode = WB_SYNC_NONE, |
345 | .older_than_this = NULL, | 342 | .older_than_this = NULL, |
346 | .range_cyclic = 1, | 343 | .range_cyclic = 1, |
347 | .nr_to_write = 1024, | 344 | .nr_to_write = 1024, |
348 | }; | 345 | }; |
349 | 346 | ||
350 | writeback_inodes_wbc(&wbc); | 347 | writeback_inodes_wb(&bdi->wb, &wbc); |
351 | } | 348 | } |
352 | 349 | ||
353 | /* | 350 | /* |
@@ -675,12 +672,6 @@ int bdi_init(struct backing_dev_info *bdi) | |||
675 | 672 | ||
676 | bdi_wb_init(&bdi->wb, bdi); | 673 | bdi_wb_init(&bdi->wb, bdi); |
677 | 674 | ||
678 | /* | ||
679 | * Just one thread support for now, hard code mask and count | ||
680 | */ | ||
681 | bdi->wb_mask = 1; | ||
682 | bdi->wb_cnt = 1; | ||
683 | |||
684 | for (i = 0; i < NR_BDI_STAT_ITEMS; i++) { | 675 | for (i = 0; i < NR_BDI_STAT_ITEMS; i++) { |
685 | err = percpu_counter_init(&bdi->bdi_stat[i], 0); | 676 | err = percpu_counter_init(&bdi->bdi_stat[i], 0); |
686 | if (err) | 677 | if (err) |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 54f28bd493d3..37498ef61548 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -495,7 +495,6 @@ static void balance_dirty_pages(struct address_space *mapping, | |||
495 | 495 | ||
496 | for (;;) { | 496 | for (;;) { |
497 | struct writeback_control wbc = { | 497 | struct writeback_control wbc = { |
498 | .bdi = bdi, | ||
499 | .sync_mode = WB_SYNC_NONE, | 498 | .sync_mode = WB_SYNC_NONE, |
500 | .older_than_this = NULL, | 499 | .older_than_this = NULL, |
501 | .nr_to_write = write_chunk, | 500 | .nr_to_write = write_chunk, |
@@ -537,7 +536,7 @@ static void balance_dirty_pages(struct address_space *mapping, | |||
537 | * up. | 536 | * up. |
538 | */ | 537 | */ |
539 | if (bdi_nr_reclaimable > bdi_thresh) { | 538 | if (bdi_nr_reclaimable > bdi_thresh) { |
540 | writeback_inodes_wbc(&wbc); | 539 | writeback_inodes_wb(&bdi->wb, &wbc); |
541 | pages_written += write_chunk - wbc.nr_to_write; | 540 | pages_written += write_chunk - wbc.nr_to_write; |
542 | get_dirty_limits(&background_thresh, &dirty_thresh, | 541 | get_dirty_limits(&background_thresh, &dirty_thresh, |
543 | &bdi_thresh, bdi); | 542 | &bdi_thresh, bdi); |