[Desire Android Development] melethron:
Well you could still add this as a warning since almost all ROMs have the Power Menu. Is it really that hard to type 3 lines to help to prevent data loss for some people?

Quote snipped.

Sorry you didn't understand what i meant. I didnt mean the alignement of the FAT partition. That was fine. I made the alignement with gparted and checked it in fdisk. You can check this post where i describe it.

Also i didnt talk about ext4 WITHOUT loop. I meant an unjournaled ext4 attached to /dev/block/loop0 and then mount that loop device. (mount -o loop doesnt work if it is proper block device).

What i meant is the misalignment of the blocks of the loopfile.

If you fill your aligned fat partition with dd completly this file will start behind the superblock of the fat partition. The superblock has an offset of 2 sectors and is 2 sectors long. The sector size is 512 bytes so the empty space of your partition starts at 2kb. This means if you have an aligned fat 2 partition your loopfile will not be aligned anymore but will have an offset of 2kb. On a 128kb alignement the 32th block would end perfectly at 128kb. But the 32th block of your loop file will end at 130 kb (and thus ruin the alignement) because of the 2kb needed for that FAT superblock.

Apart from that - as i already set - an UNJOURNALED ext4 LOOP device is better because of the ext4 extends feature which increases speed on files larger then the block size (4kb).

These are 2 reasons why an Unjournaled ext4 direct loop mount is better. And this is what i will also add as additional live-on-the-edge mod to my ROM (with all credits to you of course ... i made an improvement but is still based on your script).

I dont know what you mean with data=ordered. Data=ordered is an option for the journaling (3 modes there: full journaling - ordered journaling - writeback journaling).

/sdcard is handled different by android. There is seperate service (Vold) that handles the sdcard as it can also be unmounted while the system is running. You can see that android unmounts it if you do "adb logcat" on shutdown (the internal partitions are unmounted after adb closes - that was the reason i thought data doesnt get unmounted in the first place - i didn't think about tune2fs to check ^^ thanks again for that).

Also about the benchmark. This benchmark was made SPECIFICALLY to test the lagfixes for samsung galaxy S. Since they have an internal sd card instead of nand they have "data2sd from stock". Most values of these benchmark arent that important. Important is the database write/s.

The difference between app2sd and data2sd is that /data/data is on the sd-card. And in this folder is the sqlite db. The data injection in sqlite is what causes lags. If you only get like 20 writes/s this is enough to cause a 250ms-500ms lag if there is a background sync goin on. The values are between 20-50 on most stuff i tested. The value of your script was 197. The value of my slight modification was 199. This score has (of course) to be considered on par. The reason you don't see any difference there is the skip of the fsync() that means the bench can't measure the actual flush of the loop device cache. This happens in background. And that is where a direct loop device has an advantage over a loopFILE.

I didn't expect such a speed increase from loop cache and i was wrong on this. Because "loop" is that fast and the risk can be minimized if neither the "power menu" nor "adb reboot" is used i add this to my ROM.

Don't know if you'll feel it but on a journaled ext4 without loop it is quite a difference then. I did five benches for each and cfq and loop and score was also on par (+-2%). So interactivity is an improvement.