From: Artem Bityutskiy <dedekind1@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: "Richard Weinberger" <richard@nod.at>,
linux-mtd@lists.infradead.org,
"David Woodhouse" <dwmw2@infradead.org>,
"Brian Norris" <computersforpeace@gmail.com>,
"Andrea Scian" <rnd4@dave-tech.it>,
"Iwo Mergler" <Iwo.Mergler@netcommwireless.com>,
"Jeff Lauruhn (jlauruhn)" <jlauruhn@micron.com>,
"Bean Huo 霍斌斌 \"\"(beanhuo)\"\"" <beanhuo@micron.com>
Subject: Re: UBI/UBIFS: dealing with MLC's paired pages
Date: Fri, 30 Oct 2015 12:09:25 +0200 [thread overview]
Message-ID: <1446199765.6126.63.camel@gmail.com> (raw)
In-Reply-To: <20151030104537.2196c4a8@bbrezillon>
On Fri, 2015-10-30 at 10:45 +0100, Boris Brezillon wrote:
> On Fri, 30 Oct 2015 11:08:10 +0200
> Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> > On Fri, 2015-10-30 at 09:15 +0100, Boris Brezillon wrote:
> > > Hi Artem,
> > >
> > > Don't take the following answer as a try to teach you how
> > > UBI/UBIFS
> > > work
> > > or should work with MLC NANDs. I still listen to your
> > > suggestions,
> > > but
> > > when I had a look at how this "skip pages on demand" approach
> > > could
> > > be implemented I realized it was not so simple.
> >
> > Sure.
> >
> > Could you verify my understanding please.
> >
> > You realized that "skip on demand" is not easy, and you suggest
> > that we
> > simply write all the data twice - first time we skip pages, and
> > then we
> > garbage collect everything. At the end, roughly speaking, we trade
> > off
> > half of the IO speed, power, and NAND lifetime.
So I guess the answer is generally "yes", right? I just want to be
clear about the trade-off.
> That will be pretty much the same with the "skip on demand" approach,
> because you'll probably loose a lot of space when syncing the wbuf.
Write buffer is designed to optimized space usage. Instead of wasting
the rest of the NAND page, we wait for more data to arrive and put it
to the same NAND page with the previous piece of data.
This suggests that we do not sync it too often, or at least that the
efforts were taken not to do this.
Off the top of my head, we sync the write-buffer (AKA wbuf) in these
cases:
1. Journal commit, which happens once in a while, depends on journal
size.
2. User-initiated sync, like fsync(), sync(), remount, etc.
3. Write-buffer timer, which fires when there were no writes withing
certain interval, like 5 seconds. The time can be tuned.
4. Other situations like the end of GC, etc - these are related to meta
-data management.
Now, imagine you writing a lot of data, like uncompressing a big
tarball, or compressing, or just backing up your /home. In this
situation you have a continuous flow of data from VFS to UBIFS.
UBIFS will keep writing the data to the journal, and there won't be any
wbuf syncs. The syncs will happen only on journal commit. So you end up
with LEBs full of data and not requiring any GC.
But yes, if we are talking about, say, an idle system, which
occasionally writes something, there will be a wbuf sync after every
write.
So in the "I need all your capacity" kind of situations where IO speed
matters, and there are a lot of data written - we'd be optimal, no
double writes.
In the "I am mostly idle" type of situations we'll do double writes.
SIGLUNCH, colleagues waiting, sorry, I guess I wrote enough :-)
> A given LEB can only be in secure or unsecure mode, but a UBI volume
> can expose both unsecure and secure LEBs, and those LEBs have
> different
> sizes.
> The secure/unsecure mode is chosen when mapping the LEB, and the LEB
> stays in this mode until it's unmapped.
This is not going to be a little value add to UBI, this is going to be
a big change in my opinion. If UBIFS ends up using this - may worth the
effort. Otherwise, I'd argue that this would need an important customer
to be worth the effort.
next prev parent reply other threads:[~2015-10-30 10:09 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 13:22 UBI/UBIFS: dealing with MLC's paired pages Boris Brezillon
2015-09-17 15:20 ` Artem Bityutskiy
2015-09-17 15:46 ` Boris Brezillon
2015-09-17 16:47 ` Richard Weinberger
2015-09-18 7:17 ` Andrea Scian
2015-09-18 7:41 ` Boris Brezillon
2015-09-18 7:54 ` Artem Bityutskiy
2015-09-18 7:57 ` Bityutskiy, Artem
2015-09-18 9:38 ` Andrea Scian
2015-09-24 1:57 ` Karl Zhang 张双锣 (karlzhang)
2015-09-24 6:31 ` Richard Weinberger
2015-09-24 7:43 ` Boris Brezillon
2015-09-24 9:44 ` Stefan Roese
2015-09-29 11:19 ` Richard Weinberger
2015-09-29 12:51 ` Boris Brezillon
2015-10-23 8:14 ` Boris Brezillon
2015-10-27 20:16 ` Richard Weinberger
2015-10-28 9:24 ` Boris Brezillon
2015-10-28 10:44 ` Michal Suchanek
2015-10-28 11:14 ` Boris Brezillon
2015-10-28 15:50 ` Michal Suchanek
2015-10-28 12:24 ` Artem Bityutskiy
2015-10-30 8:15 ` Boris Brezillon
2015-10-30 8:21 ` Boris Brezillon
2015-10-30 8:50 ` Bean Huo 霍斌斌 (beanhuo)
2015-10-30 9:08 ` Artem Bityutskiy
2015-10-30 9:45 ` Boris Brezillon
2015-10-30 10:09 ` Artem Bityutskiy [this message]
2015-10-30 11:49 ` Michal Suchanek
2015-10-30 12:47 ` Artem Bityutskiy
2015-10-30 11:43 ` Artem Bityutskiy
2015-10-30 11:59 ` Richard Weinberger
2015-10-30 12:29 ` Artem Bityutskiy
2015-10-30 12:31 ` Bityutskiy, Artem
2015-10-30 12:30 ` Boris Brezillon
2015-10-30 12:41 ` Artem Bityutskiy
2015-10-28 12:06 ` Artem Bityutskiy
[not found] <A765B125120D1346A63912DDE6D8B6310BF4CAA8@NTXXIAMBX02.xacn.micron.com>
2015-09-25 7:30 ` Boris Brezillon
2015-09-25 8:25 ` Bean Huo 霍斌斌 (beanhuo)
2015-09-25 8:35 ` Richard Weinberger
2015-09-25 8:48 ` Boris Brezillon
2015-09-25 8:30 ` Karl Zhang 张双锣 (karlzhang)
2015-09-25 8:56 ` Boris Brezillon
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=1446199765.6126.63.camel@gmail.com \
--to=dedekind1@gmail.com \
--cc=Iwo.Mergler@netcommwireless.com \
--cc=beanhuo@micron.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jlauruhn@micron.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=rnd4@dave-tech.it \
/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;
as well as URLs for NNTP newsgroup(s).