All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: dedekind1@gmail.com
Cc: Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org, dwmw2@infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] UBI: Replace yield() with cond_resched()
Date: Tue, 08 May 2012 15:22:54 +0200	[thread overview]
Message-ID: <1336483374.16236.38.camel@twins> (raw)
In-Reply-To: <1336483427.23308.37.camel@sauron.fi.intel.com>

On Tue, 2012-05-08 at 16:23 +0300, Artem Bityutskiy wrote:
> 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.

At least document the intent of that random sleep. Otherwise we'll be
having this same discussion again in a few years or so ;-)

      reply	other threads:[~2012-05-08 13:22 UTC|newest]

Thread overview: 11+ 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:26 ` Richard Weinberger
2012-05-08  8:31 ` Peter Zijlstra
2012-05-08  8:31   ` Peter Zijlstra
2012-05-08  9:02 ` Artem Bityutskiy
2012-05-08  9:02   ` Artem Bityutskiy
2012-05-08 10:59   ` Richard Weinberger
2012-05-08 10:59     ` Richard Weinberger
2012-05-08 13:23     ` Artem Bityutskiy
2012-05-08 13:23       ` Artem Bityutskiy
2012-05-08 13:22       ` Peter Zijlstra [this message]

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=1336483374.16236.38.camel@twins \
    --to=peterz@infradead.org \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.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 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.