On Wed, Oct 6, 2010 at 9:27 PM, Loïc Minier <loic.min...@linaro.org> wrote:

[...]

>  There might be an interesting speedup + bugfix in aligning the rootfs
>  partition on a power of two, e.g. 1 MiB boundary, as the SD/MMC is
>  flash internally, and undergoes erase/write cycles for fs meta-data.
>  I think only OMAP has constraints on the number of heads/sectors, but
>  we could take a factor of that: 63*255 can't really be factored well,
>  but we could use LBA addressing and start in the middle of a cylinder.

I had also thought about this as a potential issue.

32 sectors * 16 heads is what I usually use -- this gives a 256KB
cylinder size, which should be an integral number of underlying erase
blocks on pretty much any flash device, and has divided exactly into
the size of every SD card of flash stick I have ever seen.  If we
really want to be clever, we could use factor /sys/block/<dev>/size,
to choose head and sector counts, but I doubt that it's worth it.

Disabling the journal (for ext4, use -onoload / for ext3, mount with
-text2 instead) and/or mounting with noatime (-onoatime) would also
make sense when mounting the rootfs to populate it, especially when
using --mmc; this might improve performance a little.

Of course, since we're not trying to boot an obsolete PC BIOS or
operating system on these devices, it's pretty meaningless to think in
terms of cylinders; even in PC-land, this convention is now considered
obsolete IIUC (how many devices _really_ have 63 sectors and 255
heads, and how much software still can't cope with >1023 cylinders?).
In that case, we could just work in multiples of 2^n sectors, for some
n (something in the range 19<=n<=21 is probably a good choice).
Fortunately, Linux partitioners always support partitioning by sector
these days.


I did try to force this configuration manually, but I ran into
problems--- the sectors/heads assumption is hard-coded into
linaro-media-create in a number of places, and I didn't end up with
something bootable... but I probably missed something.

Cheers
---Dave

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to