[PATCH] UBI: Replace yield() with cond_resched()
Artem Bityutskiy
dedekind1 at gmail.com
Tue May 8 09:23:47 EDT 2012
On Tue, 2012-05-08 at 12:59 +0200, Richard Weinberger wrote:
> > The purpose was different. If we have I/O error, we hope it is a
> > transient failure. E.g., the HW is temporary unavailable because of an
> > internal issue. And with yield() we hoped to schedule away for longer
> > time than usual and let other processes which may affect that HW go
> > forward and do something.
>
> Okay, yield() is clearly the wrong choice here.
> cond_resched() is better.
I do not think it is better. Yes, for I/O I'd suggest
msleep_interruptible(200) instead.
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120508/446d2a84/attachment.sig>
More information about the linux-mtd
mailing list