diff options
author | Shaohua Li <shaohua.li@intel.com> | 2011-03-17 05:47:06 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-03-17 05:47:06 -0400 |
commit | 9b6096a65f99a89dfd8328c4e469e7b53b3ae04a (patch) | |
tree | 8853a3c389d40bda6fd5e109179be29695d536af /mm | |
parent | 167400d34070ebbc408dc0f447c4ddb4bf837360 (diff) |
mm: make generic_writepages() use plugging
This recovers a performance regression caused by the removal
of the per-device plugging.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index cc0ede169e41..24b7ac2bc36b 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -1039,11 +1039,17 @@ static int __writepage(struct page *page, struct writeback_control *wbc, | |||
1039 | int generic_writepages(struct address_space *mapping, | 1039 | int generic_writepages(struct address_space *mapping, |
1040 | struct writeback_control *wbc) | 1040 | struct writeback_control *wbc) |
1041 | { | 1041 | { |
1042 | struct blk_plug plug; | ||
1043 | int ret; | ||
1044 | |||
1042 | /* deal with chardevs and other special file */ | 1045 | /* deal with chardevs and other special file */ |
1043 | if (!mapping->a_ops->writepage) | 1046 | if (!mapping->a_ops->writepage) |
1044 | return 0; | 1047 | return 0; |
1045 | 1048 | ||
1046 | return write_cache_pages(mapping, wbc, __writepage, mapping); | 1049 | blk_start_plug(&plug); |
1050 | ret = write_cache_pages(mapping, wbc, __writepage, mapping); | ||
1051 | blk_finish_plug(&plug); | ||
1052 | return ret; | ||
1047 | } | 1053 | } |
1048 | 1054 | ||
1049 | EXPORT_SYMBOL(generic_writepages); | 1055 | EXPORT_SYMBOL(generic_writepages); |