From: Brian Norris <computersforpeace@gmail.com>
To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: Richard Weinberger <richard@nod.at>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] ubi: do not re-read the data already read out in retry
Date: Mon, 24 Aug 2015 09:50:58 -0700 [thread overview]
Message-ID: <20150824165058.GF81844@google.com> (raw)
In-Reply-To: <55DA6DC8.9010308@cn.fujitsu.com>
On Mon, Aug 24, 2015 at 09:05:12AM +0800, Dongsheng Yang wrote:
> On 08/21/2015 05:17 PM, Richard Weinberger wrote:
> >Brian, does MTD core guarantee that upon an erroneous mtd_read() the number of "read" bytes
> >in "buf" are valid?
I'll take a look. I believe the Dongsheng is interpreting the mtd_read()
API correctly, but most MTD "guarantees" are more like surveys of
existing practice; most implementations may do something sane, but there
may be a few oddballs.
> >So, my fear is that this change will introduce new regressions (due faulty MTD drivers, etc..)
> >without a real gain.
>
> I would say "big gain" rather than "real gain".
I'd like evidence, rather than just bold statements :)
> Consider this case, if
> you are going to read 4M from driver but it failed at the last byte
> twice. When we success on the third retry, we have read out 4*3=12M for
> 4M data user requested. That tripled the latency.
On what driver do you see this? Many drivers take an all-or-nothing
approach already; they don't fill in 'retlen' to any non-zero value
until the last byte, so Richard is right in those cases.
(I can partly answer this question; nand_do_read_ops() incrementally
fills pages, and *retlen increases when a (portion of) a page is read
correctly.)
Also, what sort of failure modes are you seeing? It seems a bit dubious
to be relying on UBI I/O retry, let alone optimizing for performance,
since the retry may be masking significant problems anyway.
> But with this patch applied. we do not re-try the data we have already
> read out. So the latency is 1/3 of it mentioned above.
>
> But, yes, I said understandable, I also want Brian to say is this
> change safe enough currently.
Brian
prev parent reply other threads:[~2015-08-24 16:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 7:59 [PATCH] ubi: do not re-read the data already read out in retry Dongsheng Yang
2015-08-21 9:17 ` Richard Weinberger
2015-08-24 1:05 ` Dongsheng Yang
2015-08-24 6:46 ` Richard Weinberger
2015-08-24 7:04 ` Dongsheng Yang
2015-08-24 16:59 ` Brian Norris
2015-08-25 0:34 ` Dongsheng Yang
2015-08-24 16:50 ` 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=20150824165058.GF81844@google.com \
--to=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=yangds.fnst@cn.fujitsu.com \
/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.