nand flash driver problem
Hi all,
I am using JFFS2+MTD nand driver(uClinux Full Source
Distribution 20030909) to mount Samsung 16MB Nand flash. It looks ok except writing time(It costs about 40seconds for copying a 200KB file to Nand flash). Even I patch uClinux by New JFFS2+MTD nand driver(mtd-snapshot-20031217) , I still get the same result. But I measure the actually time that Nand flash erasing and writing one page is no more than 1ms.
I also do another test for reading or writing Nand flash by MTD
block driver and it is ok (I mean reading or writing 200KB data from/to Nand flash is not more than 1 second). So I don't know what the problem is. Do anyone meet the similar problem or any idea?
Thanks
Lys
Quoted 4 lines · 林意翔
I also do another test for reading or writing Nand flash by MTD
block driver and it is ok (I mean reading or writing 200KB data from/to Nand flash is not more than 1 second). So I don't know what the problem is. Do anyone meet the similar problem or any idea?
Use profiling to see where it's spending all its time. Read the 'readprofile' man page.
Signature · 1 line
dwmw2
Quoted 8 lines · David Woodhouse
Quoted 4 lines · ?????????
I also do another test for reading or writing Nand flash by MTD
block driver and it is ok (I mean reading or writing 200KB data from/to Nand flash is not more than 1 second). So I don't know what the problem is. Do anyone meet the similar problem or any idea?Use profiling to see where it's spending all its time. Read the 'readprofile' man page.
The time it takes to write to a regular file depends a lot on the buffer size when copying data. Some implementations of cp, for example, always use the same buffer size and doesn't use stat or statfs to find out the blocksize of the destination file system. I guess the compression in JFFS2 is a bottleneck when copying too small chunks.
/Jonas