Comment 37 for bug 709245

Revision history for this message
warmcat (andy-warmcat) wrote :

Ming-Lei it sounds like a really good explanation. But when I test it, I don't see any real difference on USB memory stick before and after. Maybe my test is broken somehow?

8GB no-name USB stick

Before the patch -->

root@linaro:~# dd if=/dev/urandom of=/media/dump bs=40960 count=1000
1000+0 records in
1000+0 records out
40960000 bytes (41 MB) copied, 21.9735 s, 1.9 MB/s

root@linaro:~# dd if=/dev/urandom of=/media/dump bs=40960 count=1000
1000+0 records in
1000+0 records out
40960000 bytes (41 MB) copied, 21.3798 s, 1.9 MB/s

root@linaro:~# dd if=/dev/urandom of=/media/dump bs=40960 count=1000
1000+0 records in
1000+0 records out
40960000 bytes (41 MB) copied, 21.3694 s, 1.9 MB/s

After the patch -->

root@linaro:~# mount /dev/sda1 /media/
root@linaro:~# dd if=/dev/urandom of=/media/dump bs=40960 count=1000
1000+0 records in
1000+0 records out
40960000 bytes (41 MB) copied, 21.6143 s, 1.9 MB/s
root@linaro:~# dd if=/dev/urandom of=/media/dump bs=40960 count=1000
1000+0 records in
1000+0 records out
40960000 bytes (41 MB) copied, 21.6175 s, 1.9 MB/s
root@linaro:~# dd if=/dev/urandom of=/media/dump bs=40960 count=1000
1000+0 records in
1000+0 records out
40960000 bytes (41 MB) copied, 21.5983 s, 1.9 MB/s

I like the idea the delay is coming from L2 cache not being evicted until something else forces it a lot though.