From: Bill Pringlemeir <bpringlemeir@nbsps.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase
Date: Tue, 07 Apr 2015 10:06:46 -0400 [thread overview]
Message-ID: <877ftokp6x.fsf@nbsps.com> (raw)
In-Reply-To: <1428094996.22867.364.camel@freescale.com> (Scott Wood's message of "Fri, 3 Apr 2015 16:03:16 -0500")
On 3 Apr 2015, scottwood at freescale.com wrote:
> On Fri, 2015-04-03 at 22:28 +0200, Stefan Agner wrote:
>> Why not? IMHO, there are valid reason to do it, since we save coping
>> data over the bus (we save copying page size - write len of bytes)...
> According to http://www.linux-mtd.infradead.org/doc/ubi.html#L_subpage
> the motivation for subpages is saving space, not time, and it's only
> used for headers (specifically because using subpages may be slower).
> So it may not make a huge performance difference either way, even if
> subpages are less efficient on this controller -- though it does have
> a complexity cost that is higher than with most controllers. It looks
> like the space savings is around one page per block.
I think that Artem wrote this. I don't believe the document is
completely correct; I think he meant that sub-pages is not architected
as a speed improvement. For instance, UBI will read both a VID (volume
ID) and EB (erase block). As the are combined into one, then if a
driver needs to read a full page (like it is the only thing it supports)
then it is simple to read a full page with a VID/EB sub-pages.
Certainly for mounts with out 'fastmap', this will result in much faster
scans and initial UBI/UbiFS mounts?
It also saves one page overhead per erase block. So in all cases,
sub-pages will optimize flash usage. Probably performance depends on
the MTD driver and CPU.
> It'd be good to benchmark up front to be sure you're happy with the
> speed/space/complexity tradeoff, though, since enabling/disabling
> subpage writes breaks UBI compatibility.
I think that if you format the UbiFs without sub-pages and then update
code to handle sub-pages, you are fine. If you have flash/UBI formatted
with sub-pages and then you disable it in the code, the disk is no
longer mountable.
In any case the document has,
If the NAND flash supports sub-pages, then what can be done is ECC
codes can be calculated on per-sub-page basis, instead of per-NAND
page basis. In this case it becomes possible to read and write
sub-pages independently.
Probably if we want sub-pages with this controller and hw-ecc, we need
to use the virtual buffer features of the chip. The controller needs an
entire current buffer in the SRAM to calculate the hw-ecc to write. So
even if it writes less than a full page, the entire page must be read to
calculate the hw-ecc to be written. I am pretty sure that all
controllers that support hw-ecc will need to do this.
Fwiw,
Bill Pringlemeir.
next prev parent reply other threads:[~2015-04-07 14:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 16:54 [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase Stefan Agner
2015-03-24 16:54 ` [U-Boot] [PATCH 2/2] mtd: vf610_nfc: specify transfer size before each transfer Stefan Agner
2015-03-30 17:02 ` [U-Boot] [PATCH 1/2] mtd: vf610_nfc: mark page as dirty on block erase Bill Pringlemeir
2015-03-30 20:14 ` Stefan Agner
2015-03-30 20:46 ` Scott Wood
2015-03-30 20:34 ` Scott Wood
2015-03-30 20:40 ` Stefan Agner
2015-03-30 20:48 ` Scott Wood
2015-03-30 21:26 ` Stefan Agner
2015-03-30 22:15 ` Scott Wood
2015-03-30 22:24 ` Stefan Agner
2015-03-31 4:34 ` Scott Wood
2015-03-31 15:02 ` Bill Pringlemeir
2015-04-02 23:48 ` Scott Wood
2015-04-03 18:09 ` Stefan Agner
2015-04-03 20:15 ` Scott Wood
2015-04-03 20:28 ` Stefan Agner
2015-04-03 21:03 ` Scott Wood
2015-04-07 14:06 ` Bill Pringlemeir [this message]
2015-04-07 16:02 ` Scott Wood
2015-04-07 17:54 ` Bill Pringlemeir
2015-04-07 21:09 ` Scott Wood
2015-03-30 21:35 ` Bill Pringlemeir
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=877ftokp6x.fsf@nbsps.com \
--to=bpringlemeir@nbsps.com \
--cc=u-boot@lists.denx.de \
/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.