From: NeilBrown Date: Fri, 16 Oct 2009 04:55:32 +0000 (+1100) Subject: md/raid1/raid10: add a cond_resched X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1d9d52416c0445019ccc1f0fddb9a227456eb61b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git md/raid1/raid10: add a cond_resched During 'check' of a raid1 or raid10 it is possible for the management thread to spend a lot of time running 'memcmp' on blocks from different devices, so make sure the thread has a chance to schedule. raid5d already has a cond_resched (in process_stripe). Reported-By: Lee Howard Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d1b9bd5fd4f6..71a01a2e1938 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1683,6 +1683,7 @@ static void raid1d(mddev_t *mddev) generic_make_request(bio); } } + cond_resched(); } if (unplug) unplug_slaves(mddev); diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 51c4c5c4d87a..69fc76caa469 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1632,6 +1632,7 @@ static void raid10d(mddev_t *mddev) generic_make_request(bio); } } + cond_resched(); } if (unplug) unplug_slaves(mddev);