From: Artem Bityutskiy <dedekind1@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: peterz@infradead.org, dwmw2@infradead.org,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] UBI: Replace yield() with cond_resched()
Date: Tue, 08 May 2012 16:23:47 +0300 [thread overview]
Message-ID: <1336483427.23308.37.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <4FA8FC83.7000503@nod.at>
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-08 13:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 8:26 [PATCH] UBI: Replace yield() with cond_resched() Richard Weinberger
2012-05-08 8:31 ` Peter Zijlstra
2012-05-08 9:02 ` Artem Bityutskiy
2012-05-08 10:59 ` Richard Weinberger
2012-05-08 13:23 ` Artem Bityutskiy [this message]
2012-05-08 13:22 ` Peter Zijlstra
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=1336483427.23308.37.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox