提交 9b6096a6 编写于 作者: S Shaohua Li 提交者: Jens Axboe

mm: make generic_writepages() use plugging

This recovers a performance regression caused by the removal
of the per-device plugging.
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 167400d3
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册