Commit ac8fa4196d20 ("md: allow resync to go faster when there is competing IO.") introduced performance gaining features that are very beneficial to solid state media. When the same features are used in an environment with high I/O and rotational media, extreme performance degradation of non-sync I/O can be seen. Rotational devices are still slow by comparison, so to avoid these performance issues, only apply the newer code path to non-rotational devices. Signed-off-by: John Pittman <jpittman@xxxxxxxxxx> --- drivers/md/md.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 254e44e..00dc3c4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8496,11 +8496,13 @@ void md_do_sync(struct md_thread *thread) /((jiffies-mddev->resync_mark)/HZ +1) +1; if (currspeed > speed_min(mddev)) { - if (currspeed > speed_max(mddev)) { + if (currspeed > speed_max(mddev) || (!is_mddev_idle(mddev, 0) && + !blk_queue_nonrot(mddev->queue))) { msleep(500); goto repeat; } - if (!is_mddev_idle(mddev, 0)) { + if (!is_mddev_idle(mddev, 0) && + blk_queue_nonrot(mddev->queue)) { /* * Give other IO more of a chance. * The faster the devices, the less we wait. -- 2.7.5 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html