summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2011-03-17 10:47:06 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-03-17 10:47:06 +0100
commit9b6096a65f99a89dfd8328c4e469e7b53b3ae04a (patch)
tree8853a3c389d40bda6fd5e109179be29695d536af /mm
parent167400d34070ebbc408dc0f447c4ddb4bf837360 (diff)
downloadlinux-stable-9b6096a65f99a89dfd8328c4e469e7b53b3ae04a.tar.gz
linux-stable-9b6096a65f99a89dfd8328c4e469e7b53b3ae04a.tar.bz2
linux-stable-9b6096a65f99a89dfd8328c4e469e7b53b3ae04a.zip
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.c8
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,
int generic_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
+ struct blk_plug plug;
+ int ret;
+
/* deal with chardevs and other special file */
if (!mapping->a_ops->writepage)
return 0;
- return write_cache_pages(mapping, wbc, __writepage, mapping);
+ blk_start_plug(&plug);
+ ret = write_cache_pages(mapping, wbc, __writepage, mapping);
+ blk_finish_plug(&plug);
+ return ret;
}
EXPORT_SYMBOL(generic_writepages);