* time to mount static volume seems to be too long
@ 2011-04-08 12:48 Bastian.Ruppert
2011-04-08 13:59 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Bastian.Ruppert @ 2011-04-08 12:48 UTC (permalink / raw)
To: linux-mtd; +Cc: Detlev Zundel
Hello,
I have a TI OMAPL138 ARM9 with a 2.6.38-rc6-00071-gb9b65a4 kernel here.
mkfs.ubifs -V
Version 1.4
./ubinize -V
1.2
I created a rootfs image with the following commands:
mkfs.ubifs --root=/opt/rfsb/build/rootfs --leb-size=126976
--min-io-size=2048 --max-leb-cnt=608 -o
/opt/rfsb/build/images/image.ubifs
WARNING: setting root UBIFS inode UID=GID=0 (root) and permissions to
u+rwx,go+rx; use --squash-rino-perm or --nosquash-rino-perm to
suppress this warning
./ubinize --output=/opt/rfsb/build/images/image.ubi --min-io-size=2048
--peb-size=128KiB --sub-page-size=2048
/opt/rfsb/build/images/ubinize_rootfs.cfg
The ubinize_rootfs.cfg is :
[ubifs]
mode=ubi
image=/opt/rfsb/build/images/image.ubifs
vol_id=0
vol_size=46080KiB
vol_type=static
vol_name=rootfs
vol_flags=autoresize
I can mount the rootfs, but with this configuration the rootfs mount
time is about 8 Seconds for the image in a 71MB Partition.
[...]
UBIFS: static UBI volume - read-only mode
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size: 74534912 bytes (72788 KiB, 71 MiB, 587 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
[...]
/sys/devices/virtual/ubi/ubi0/ubi0_0 # cat type
static
When changing the vol_type attribute to dynamic, the mount time is
much shorter (about 1 Second).
[...]
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size: 74534912 bytes (72788 KiB, 71 MiB, 587 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) readonly on device 0:14.
[...]
sys/devices/virtual/ubi/ubi0/ubi0_0 # cat type
dynamic
I can mount the dynamic volume as rw and I am able to write files.
It seems the volume is working fine so far.
The point of interest are the timings.
The static volume is designed for speed up booting and mounting, isn t
it?
So i have expected an inverted behaviour of the timings.
Can you please tell why the static configuration is so slow?
Or I am missing something else?
Best Regards,
Bastian Ruppert.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: time to mount static volume seems to be too long
2011-04-08 12:48 time to mount static volume seems to be too long Bastian.Ruppert
@ 2011-04-08 13:59 ` Artem Bityutskiy
2011-04-08 14:10 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2011-04-08 13:59 UTC (permalink / raw)
To: Bastian.Ruppert; +Cc: linux-mtd, Detlev Zundel
Hello,
On Fri, 2011-04-08 at 14:48 +0200, Bastian.Ruppert@sewerin.de wrote:
> [ubifs]
> mode=ubi
> image=/opt/rfsb/build/images/image.ubifs
> vol_id=0
> vol_size=46080KiB
> vol_type=static
> vol_name=rootfs
> vol_flags=autoresize
>
> I can mount the rootfs, but with this configuration the rootfs mount
> time is about 8 Seconds for the image in a 71MB Partition.
IMHO, it makes little sense to use UBIFS on top of static volumes.
Static volumes were really meant to store raw blob of data, where you
want UBI to protect it with CRC for you.
UBIFS has its own CRC protection, so with static volume you get double
CRC. Note, to force UBIFS checking data CRC on read you need to use
"chk_data_crc" option, see here:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_checksumming
IOW, you do not need double-work.
> When changing the vol_type attribute to dynamic, the mount time is
> much shorter (about 1 Second).
This is because UBI change the CRC of the whole static volume, this is
where you spend time.
> The point of interest are the timings.
> The static volume is designed for speed up booting and mounting, isn t
> it?
No, I think it was originally designed to store short blobs of data like
a configuration file.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: time to mount static volume seems to be too long
2011-04-08 13:59 ` Artem Bityutskiy
@ 2011-04-08 14:10 ` Artem Bityutskiy
0 siblings, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2011-04-08 14:10 UTC (permalink / raw)
To: Bastian.Ruppert; +Cc: linux-mtd, Detlev Zundel
On Fri, 2011-04-08 at 16:59 +0300, Artem Bityutskiy wrote:
> Hello,
>
> On Fri, 2011-04-08 at 14:48 +0200, Bastian.Ruppert@sewerin.de wrote:
> > [ubifs]
> > mode=ubi
> > image=/opt/rfsb/build/images/image.ubifs
> > vol_id=0
> > vol_size=46080KiB
> > vol_type=static
> > vol_name=rootfs
> > vol_flags=autoresize
> >
> > I can mount the rootfs, but with this configuration the rootfs mount
> > time is about 8 Seconds for the image in a 71MB Partition.
>
> IMHO, it makes little sense to use UBIFS on top of static volumes.
> Static volumes were really meant to store raw blob of data, where you
> want UBI to protect it with CRC for you.
>
> UBIFS has its own CRC protection, so with static volume you get double
> CRC. Note, to force UBIFS checking data CRC on read you need to use
> "chk_data_crc" option, see here:
>
> http://www.linux-mtd.infradead.org/doc/ubifs.html#L_checksumming
>
> IOW, you do not need double-work.
BTW, if you appreciate the help from community and want to contribute,
it'd be nice if you wrote a short text to our FAQ:
"why a dynamic volume is faster to access than a static volume of the
same size?"
You can add it to this web page:
http://www.linux-mtd.infradead.org/faq/ubi.html
To do this, clone
http://git.infradead.org/mtd-www.git
edit faq/ubi.xml, type "make", make sure it compiles. Then open it with
your browser, check it looks good in html form, then send the patch.
Thanks! :-)
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-08 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 12:48 time to mount static volume seems to be too long Bastian.Ruppert
2011-04-08 13:59 ` Artem Bityutskiy
2011-04-08 14:10 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox