From: NeilBrown <neilb@cse.unsw.edu.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md - 1 of 2 - Use "shedule_timeout(2)" instead of yield() as it seems to wait for less time.
Date: Fri, 05 Mar 2004 16:45:37 +1100 [thread overview]
Message-ID: <E1Az89R-0001su-00@notabene> (raw)
In-Reply-To: 20040305164342.7205.patches@notabene
----------- Diffstat output ------------
./drivers/md/raid5.c | 3 ++-
./drivers/md/raid6main.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff ./drivers/md/raid5.c~current~ ./drivers/md/raid5.c
--- ./drivers/md/raid5.c~current~ 2004-03-05 16:43:07.000000000 +1100
+++ ./drivers/md/raid5.c 2004-03-05 16:43:07.000000000 +1100
@@ -1409,7 +1409,8 @@ static int sync_request (mddev_t *mddev,
/* 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(2);
}
spin_lock(&sh->lock);
set_bit(STRIPE_SYNCING, &sh->state);
diff ./drivers/md/raid6main.c~current~ ./drivers/md/raid6main.c
--- ./drivers/md/raid6main.c~current~ 2004-03-05 16:43:07.000000000 +1100
+++ ./drivers/md/raid6main.c 2004-03-05 16:43:07.000000000 +1100
@@ -1571,7 +1571,8 @@ static int sync_request (mddev_t *mddev,
/* 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(2);
}
spin_lock(&sh->lock);
set_bit(STRIPE_SYNCING, &sh->state);
next prev parent reply other threads:[~2004-03-05 5:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-05 5:45 [PATCH] md - 0 of 2 - Introduction NeilBrown
2004-03-05 5:45 ` [PATCH] md - 2 of 2 - Allow assembling of partitioned arrays at boot time NeilBrown
2004-03-05 5:45 ` NeilBrown [this message]
2004-03-05 6:16 ` [PATCH] md - 1 of 2 - Use "shedule_timeout(2)" instead of yield() as it seems to wait for less time Andrew Morton
2004-03-10 2:26 ` Neil Brown
2004-03-05 8:42 ` [PATCH] md - 0 of 2 - Introduction Clemens Schwaighofer
2004-03-05 10:01 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Az89R-0001su-00@notabene \
--to=neilb@cse.unsw.edu.au \
--cc=akpm@osdl.org \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.