From: Artem Bityutskiy <dedekind@infradead.org>
To: Hamish Moffatt <hamish@cloud.net.au>
Cc: linux-mtd@lists.infradead.org
Subject: Re: choosing a file system to use on NAND/UBI
Date: Mon, 07 Apr 2008 15:15:34 +0300 [thread overview]
Message-ID: <1207570534.8040.94.camel@sauron> (raw)
In-Reply-To: <20080407112010.GA8942@cloud.net.au>
On Mon, 2008-04-07 at 21:20 +1000, Hamish Moffatt wrote:
> Is that the CRC of one whole page of each block?
Only of the headers, which are 64 bytes.
> > I have 2 quick ideas about how to improve scan speed, but I am not sure
> > if they will help.
> >
> > 1. Currently what UBI is doing is: read EC header, check it, read VID
> > header, check it. So we run mtd->read() 2 times (it might help to run it
> > 1 time because EC and VID headers go one after the other): read EC and
> > VID headers in one go, check them. We might do this soon.
>
> How much is read each time - just a few bytes? Are those reads
> duplicated by the CRC check?
Well, NAND allows reading it PAGE_SIZE units. So it reads whole page.
Your flash allows sub-page write, so UBI reads 2KiB for per each
eraseblock. Then The your CPU is doing ECC check.
> > Well, the only way is to use mkfs.ubifs for this. You may create an
> > empty image, put it to the media and that's it. Would you conceive
> > something else?
>
> I mean, I am preparing my root file system on my host and using
> mkfs.ubifs to generate an image which I write with ubiupdatevol. I found
> that zlib produced a smaller image.
That's right, zlib compresses better then lzo. But as I said, it is
slower, and reading files are slower, because de-compression is slower
in case of zlib.
> Also I found that the image can be compressed further with gzip or lzma.
Yes, because of several factors:
1. UBIFS (and JFFS2) does not compress meta-data.
2. UBIFS (and JFFS2) compresses 4KiB chunks of data independently.
Compression is better when you compress large chunks (which happens when
you use gzip or lzma), rather then small chunks.
3. The image has paddings, like paddings to the end of NAND page or to
the end of eraseblock. They also introduce more compressible data for
gzip.
> Could ubiupdatevol support on-the-fly decompression?
Err, why?
> I will develop a
> patch if I have time.. I already patched flashcp to do this once.
Sorry, I am not sure what you mean here as well. What did your patch do?
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2008-04-07 12:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 1:04 choosing a file system to use on NAND/UBI Hamish Moffatt
2008-03-28 6:33 ` Artem Bityutskiy
2008-04-07 5:12 ` Hamish Moffatt
2008-04-07 7:13 ` Artem Bityutskiy
2008-04-07 7:32 ` Hamish Moffatt
2008-04-07 7:48 ` Hamish Moffatt
2008-04-07 7:56 ` Artem Bityutskiy
2008-04-07 11:20 ` Hamish Moffatt
2008-04-07 12:15 ` Artem Bityutskiy [this message]
2008-04-07 12:16 ` Artem Bityutskiy
2008-04-07 12:22 ` Hamish Moffatt
2008-04-07 12:44 ` Artem Bityutskiy
2008-04-07 15:31 ` Jamie Lokier
2008-04-08 10:21 ` Hamish Moffatt
2008-04-07 8:41 ` Artem Bityutskiy
2008-04-08 7:07 ` Artem Bityutskiy
2008-03-28 7:22 ` Adrian Hunter
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=1207570534.8040.94.camel@sauron \
--to=dedekind@infradead.org \
--cc=hamish@cloud.net.au \
--cc=linux-mtd@lists.infradead.org \
/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