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>

authored by

Shaohua Li and committed by
Jens Axboe
9b6096a6 167400d3

+7 -1
+7 -1
mm/page-writeback.c
··· 1039 1039 int generic_writepages(struct address_space *mapping, 1040 1040 struct writeback_control *wbc) 1041 1041 { 1042 + struct blk_plug plug; 1043 + int ret; 1044 + 1042 1045 /* deal with chardevs and other special file */ 1043 1046 if (!mapping->a_ops->writepage) 1044 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 1055 EXPORT_SYMBOL(generic_writepages);