[PATCH 0/2] Improve GTA02 NAND read performance by 41%

Micael Henriksson micael.h at gmail.com
Wed Oct 22 02:00:16 CEST 2008


On Tue, Oct 21, 2008 at 12:32 AM, Harald Welte <laforge at openmoko.org> wrote:
> Hi Micael,
>
> On Mon, Oct 20, 2008 at 10:29:24PM +0200, Micael Henriksson wrote:
>
>> Does this only concern GTA02 or can a similar thing be applied to GTA01 as well?
>
> GTA01 uses an external flash memory which has different timings.  However,
> it is certainly useful to investigate if the timings are optimal or not.
>
> According to the data sheet, the following timings should be sufficient:
>
> Tacls = 0ns, Twrph0 = 25ns, Twrph1 = 25ns
>
> The GTA01 kernel currently uses 20ns / 60ns / 20ns (according to
> gta01_nand_info).  So there should be room for improvement, too!
>
> However, since the HCLK runs at 133MHz on GTA01, there's a 7.52ns granularity,
> i.e. the actual values used should be
> * old kernel: Tacls = 3 (22.53ns), Twrph0 = 8 (60.16ns), Twrph1 = 3 (22.53ns)
> * optimized: Tacls = 0 (0ns), Twrph0 = 4 (30.08ns), Twrph1 = 4 (30.08ns)
>

I had a try at this and got these results:

First with the kernel I had flashed in GTA01:
uImage-2.6.24+git0+a1e97c611253511ffc2d8c45e3e6d6894fa03fa3-r1.01-om-gta01.bin
Linux om-gta01 2.6.24 #3 PREEMPT Sun Aug 3 16:08:32 CDT 2008 armv4tl unknown

that gave me this results:
root at om-gta01:/# time dd if=/dev/mtd4 of=/dev/null
125152+0 records in
125152+0 records out
real    0m 15.24s
user    0m 0.15s
sys     0m 15.09s

125152*512 = 62576KByte  => 4106KByte/s

======================================================
Next I built the stable-tracking branch
Linux om-gta01 2.6.27-stable-tracking_46b03edac126c630-mokodev #3
PREEMPT Wed Oct 22 00:50:32 CEST 2008 armv4tl unknown

root at om-gta01:~# time dd if=/dev/mtd4 of=/dev/null
125152+0 records in
125152+0 records out
real    0m 21.46s
user    0m 0.24s
sys     0m 21.20s

=> 2916KByte/s


======================================================
Next was the improved timing settings

Verified that the timings are correct from boot log:
[21474537.680000] s3c2410-nand s3c2410-nand: Tacls=0, 0ns Twrph0=4
30ns, Twrph1=4 30ns

root at om-gta01:~# time dd if=/dev/mtd4 of=/dev/null
125152+0 records in
125152+0 records out
real    0m 20.19s
user    0m 0.22s
sys     0m 19.95s

=> 3099KByte/s

======================================================

The timing only differs in the last decimal between runs, so the
results are quite consistent.

If I increase the byte size for dd to 2048, there is a significant
difference. (only tested with the improved timing yet)

root at om-gta01:~# time dd bs=2048 if=/dev/mtd4 of=/dev/null
31288+0 records in
31288+0 records out
real    0m 16.28s
user    0m 0.07s
sys     0m 16.17s
=> 3844KByte/s


Even with the improved timings applied on stable-tracking and bs=2048,
the "old" kernel from 2.4.24 are still faster.

hmm.. I'll need to check this more tomorrow..

Cheers,
Micael



More information about the openmoko-kernel mailing list