When raid1d() submits a lot of IO, block plug can improve IO merge and increase IO throughput. But, after commit 18022a1bd37 ("md/raid1/10: add missed blk plug"), flush_pending_writes have added start/finish plug by itself. Except flush_pending_writes(), other processing in raid1d() would not submit a lot of IO. They may issue some IO, but these IOs are synchronous, i.e. submit bio and wait it finish. Plug can increase io latency, which is not expected. Thus, we may need to remove the unneceessary start/finish plug. Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx> --- drivers/md/raid1.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 2aa36e570e04..1c9b501b091a 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2490,7 +2490,6 @@ static void raid1d(struct md_thread *thread) unsigned long flags; struct r1conf *conf = mddev->private; struct list_head *head = &conf->retry_list; - struct blk_plug plug; int idx; md_check_recovery(mddev); @@ -2516,7 +2515,6 @@ static void raid1d(struct md_thread *thread) } } - blk_start_plug(&plug); for (;;) { flush_pending_writes(conf); @@ -2552,7 +2550,6 @@ static void raid1d(struct md_thread *thread) if (mddev->sb_flags & ~(1<<MD_SB_CHANGE_PENDING)) md_check_recovery(mddev); } - blk_finish_plug(&plug); } static int init_resync(struct r1conf *conf) -- 2.17.2