All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>,
	Harvey Hunt <harvey.hunt@imgtec.com>,
	Alex Smith <alex.smith@imgtec.com>,
	Niklas Cassel <niklas.cassel@axis.com>,
	Alex Smith <alex@alex-smith.me.uk>
Subject: Re: [PATCH] mtd: nand: check status before reporting timeout
Date: Mon, 7 Mar 2016 13:51:40 -0800	[thread overview]
Message-ID: <20160307215140.GB55664@google.com> (raw)
In-Reply-To: <1457140763-67571-1-git-send-email-computersforpeace@gmail.com>

On Fri, Mar 04, 2016 at 05:19:23PM -0800, Brian Norris wrote:
> In commit b70af9bef49b ("mtd: nand: increase ready wait timeout and
> report timeouts"), we increased the likelihood of scheduling during
> nand_wait(). This makes us more likely to hit the time_before(...)
> condition, since a lot of time may pass before we get scheduled again.
> 
> Now, the loop was already buggy, since we don't check if the NAND is
> ready after exiting the loop; we simply print out a timeout warning. Fix
> this by doing a final status check before printing a timeout message.
> 
> This isn't actually a critical bug, since the only effect is a false
> warning print. But too many prints never hurt anyone, did they? :)
> 
> Side note: perhaps I'm not smart enough, but I'm not sure what the best
> policy is for this kind of loop; do we busy loop (i.e., no
> cond_resched()) to keep the lowest I/O latency (it's not great if the
> resched is delaying Richard's system ~400ms)? Or do we allow
> rescheduling, to play nice with the rest of the system (since some
> operations can take quite a while)?
> 
> Reported-by: Richard Weinberger <richard@nod.at>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Reviewed-by: Richard Weinberger <richard@nod.at>
> Reviewed-by: Harvey Hunt <harvey.hunt@imgtec.com>

Applied

      reply	other threads:[~2016-03-07 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05  1:19 [PATCH] mtd: nand: check status before reporting timeout Brian Norris
2016-03-07 21:51 ` Brian Norris [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=20160307215140.GB55664@google.com \
    --to=computersforpeace@gmail.com \
    --cc=alex.smith@imgtec.com \
    --cc=alex@alex-smith.me.uk \
    --cc=boris.brezillon@free-electrons.com \
    --cc=harvey.hunt@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=niklas.cassel@axis.com \
    --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.