View Single Post
Old 03-01-2012, 03:17 PM   #17
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post
Nice! That kernel version would let us run compache with immediate release notification so we can free compressed cache immediately. The kernel on the K4NT and Touch will run compcache fine, but freeing memory may be delayed until a process terminates. Freeing memory immediately on release is MUCH better.

But then, as the kindles are now with NO cache, even limited compcache support is a huge plus.

I think that putting cache files on the mmc instead of compressed RAM is a bad idea, because I did not see write wear levelling code in the mmc read and write routines. Compcache was designed for tablet devices like the kindles, and I think that we should be using it. The touch runs out of memory much too quickly, especially when using optware while the framework is still running.
Another thing to keep in mind while mucking about with things...
Once you have a writable overlay system, then you can have a ro base.

A quick comparison, the k-3.2.1 base filesystem image as ext3 and as squashfs:
Code:
mszick@core2quad /bun1/Builds/Kindle/k-3.2.1/bin.tgz/img $ file rootfs.img
rootfs.img: Linux rev 1.0 ext3 filesystem data, UUID=96b81823-9626-43b1-a98b-a8085e28e614
- - -
mszick@core2quad /bun1/Builds/Kindle $ ls -l /bun1/Builds/Kindle/k-3.2.1/bin.tgz/img/rootfs.img
-rw-r--r-- 1 mszick mszick 419454976 2012-03-01 13:56 /bun1/Builds/Kindle/k-3.2.1/bin.tgz/img/rootfs.img
Now make a quick squashfs image of that, without any selecting or trimming or anything other than the default options:

Code:
mszick@core2quad /bun1/Builds/Kindle $ sudo mksquashfs /mnt/k321 k321.sfs
- - - snip - - -
mszick@core2quad /bun1/Builds/Kindle $ ls -l *.sfs
-rw-r--r-- 1 root root 248823808 2012-03-01 13:56 k321.sfs
Loop mount both images, check for amount of space used in the images (the ext3 image wasn't 100% full):

Code:
mszick@core2quad /bun1/Builds/Kindle/k-3.2.1/bin.tgz $ du -s /mnt/k321
359379	/mnt/k321
- - -
mszick@core2quad /bun1/Builds/Kindle $ du -s /mnt/k-sfs
355850	/mnt/k-sfs
Not much difference, but "free space" doesn't count in squashfs - you can't write to it.

Here is where the difference lies (if the reader didn't see it above):
The ext3 image requires: 419,454,976 bytes to store on flash.
The squashfs image requires: 248,823,808 bytes to store on flash.

Just because lab126 is still learning to build an embedded Linux system does not mean we have to follow their examples. We should know better than to do that here (follow lab126 example that is).

Last edited by knc1; 03-01-2012 at 03:20 PM.
knc1 is offline   Reply With Quote