ubifs, ubiblk(formatted with vfat) and yaffs2 test

KeunO Park lastnite at gmail.com
Mon Jun 2 01:55:10 EDT 2008


2008/6/2 Nancy <nancydreaming at gmail.com>:
> Hi,
>   Thank you for sharing your test report!
>   For ubiblk,  cp; sync;  is not enough, cause ubiblk hold back a LEB
> in ram until another logical block number LEB wants to use the
> writecache(in ubiblk) or an block device layer "release" call will
> drive the LEB in writecache to be written on Nand Flash.
>   For FAT, when it write some files, usually, it modify FAT table
> first, then goes the file contends, finally still need to change
> something in FAT table or whatever it is which belongs to the
> Filesystem meta data. That means, the last LEB hold back in ram
> contains the most important data (filesystem meta data). If there
> comes unclean reboot. That may lost lots of data. Though UBI tolerant
> unclean reboot. In this case, you should use tool "dosfsck
> /dev/ubiblockN -a" before you mount ubiblock again. And see what you
> have lost!
>   To be safe, you should do : cp...; sync; flushcache /dev/ubiblockN
>   I'm not sure block device layer's Ioctl "BLKFLSBUF" use in this
> way. Is there any command like sync, not just sync the buffer cache,
> but also the buffer in dirver layer( call that ioctl :-)
>
> /* flushcache.c  */
> #include <sys/ioctl.h>
> #include <linux/fs.h>
> #include <fcntl.h>
> #include <stdio.h>
>
> int main(int argc,char **argv)
> {
>        int fd;
>
>        if( argc != 2 ){
>                printf( "Usage:%s device name(full path)\n", argv[0] );
>                return -1;
>        }
>
>        if( (fd = open( argv[1], O_RDONLY ) ) == -1) {
>                printf( "Open %s failed\n", argv[1] );
>                return -1;
>        }
>
>        if( ioctl( fd, BLKFLSBUF) == -1)
>                printf("flush catche failed\n");
>
>        close(fd);
>        return 0;
> }
>
> --
> Best wishes,
> Nancy
>



hi.  I've tested the speed & load avg again. (I used flushcache
program that you attached. )
here is the new result.
the major difference of the result is the load avg.
even it is higher than ubifs(using ZLIB compressor).

[write test]

>yaffs2
>write: 10.20s, 12.09s, 12.24s avg:11.51s (868KB/s)
>load avg right after copy&sync: 0.03 -> 0.11

>ubifs (LZO)
>write: 14.45s, 14.40s, 14.45s avg:14.43s (693KB/s)
>load avg right after copy&sync: 0.03 -> 0.53

>ubifs (ZLIB)
>write : 27.17s, 27.18s, 27.21s avg:27.18 (367KB/s)
>load avg right after copy&sync: 0.03 -> 0.80

>ubifs (No Compression)
>write: 6.69s, 10.90s, 10.98s avg:9.52s (1050KB/s)
>load avg right after copy&sync: 0.03 -> 0.43

ubiblk(vfat mount)
write: 15.39s, 15.82s, 16.03s avg:15.74s (635KB/s)
load avg right after copy&sync: 0.03 -> 0.85

thank you.


regards,
KeunO Park.



More information about the linux-mtd mailing list