Hi David,
Thank you so much for that. It was extremely helpful.
We were indeed mounting the drive syncronously, *and* the USB is falling
back to OHCI. Following your suggestions and removing the sync flag
seems to have helped a bit, so to recompile the kernel next ...
cheers
Kjetil
David George wrote:
Hi Kjetil.
So, we have a ROACH system that we have set up to boot via usbboot
into a full debian etch filesystem. The problem is that we get
extremely low write speeds to the disk. In the order of a couple of
Mbit/s.
The problem might be that your root filesystem is mounted with the
'sync' flag. Edit your /etc/rcSimple file (Init runs this script first);
if you have something like:
mount -o remount,rw,sync,noatime /
change it to something like:
mount -o remount,rw,noatime /
This was my mistake - I though it would be a good idea for SD/MMC card
access to be synchronous. Turns out it wasn't really. Perhaps a
filesystem update is on the cards.
The other problem is the AMCC PPC440EPX USB seems to misbehave quite
badly. I have been fiddling around for a day or so, trying to work out
why one of our flash sticks doesn't work reliably.
Firstly, there is a known issue for the PPC440EPX USB that can lead to
screw-ups when both OHCI and EHCI Linux drivers are loaded.
https://kerneltrap.org/mailarchive/linux-usb/2008/11/2/3900114
There are fixes (hacks) in the upstream kernel, but we are running off
the old "ppc" tree and updating to the new "powerpc" is not an
insignificant task (It will probably happen this year though). I think
this leads to USB devices falling over to OHCI (full-speed) even when
they are EHCI(high-speed) compatible. This leads to data-rates of 1-2 MB
per second. This could also be your problem.
Now in theory, if you compile a kernel with just EHCI (high-speed mode)
your USB devices should work at high speeds (9+ MB per second). However,
I have seen very weird behaviour on one specific flash drive here with
just EHCI compiled in. When I first insert the device the usb driver
spews out errors. Then if I put in another device, which happens to
work, and reinsert the old flakey flash drive it works fine from then
on. This makes me think there is some software/setup problem. The same
flakey device always works in OHCI mode when EHCI hasn't been compiled
into the kernel.
In summary - USB on ROACH has some known problems which will hopefully
improve when we update to the new mainline kernel. If you are having
reliability trouble try compiling a kernel without EHCI. If you want
maximum performance try compiling without OHCI. Also make sure that your
root filesystem isn't mounted 'sync'.
Regards,
David