Commit b0b191f3 authored by Andrew Morton's avatar Andrew Morton Committed by Len Brown

[PATCH] md: use "shedule_timeout()" instead of yield()

From: NeilBrown <neilb@cse.unsw.edu.au>

Use "shedule_timeout()" instead of yield() as it seems to wait for less
time.
parent abf1e853
......@@ -1409,7 +1409,8 @@ static int sync_request (mddev_t *mddev, sector_t sector_nr, int go_faster)
/* make sure we don't swamp the stripe cache if someone else
* is trying to get access
*/
yield();
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}
spin_lock(&sh->lock);
set_bit(STRIPE_SYNCING, &sh->state);
......
......@@ -1571,7 +1571,8 @@ static int sync_request (mddev_t *mddev, sector_t sector_nr, int go_faster)
/* make sure we don't swamp the stripe cache if someone else
* is trying to get access
*/
yield();
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}
spin_lock(&sh->lock);
set_bit(STRIPE_SYNCING, &sh->state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment