On Sun, Dec 27, 2009 at 1:46 PM, Paul Hartman <paul.hartman+gen...@gmail.com> wrote: > On Sun, Dec 27, 2009 at 12:10 PM, Paul Hartman > <paul.hartman+gen...@gmail.com> wrote: >> On Sun, Dec 27, 2009 at 12:01 AM, Michael Holmes >> <holmesm...@googlemail.com> wrote: >>> 2009/12/27 Paul Hartman <paul.hartman+gen...@gmail.com>: >>>> On Sat, Dec 26, 2009 at 7:00 PM, Hung Dang <hungp...@gmail.com> wrote: >>>>> On 12/26/09 15:54, Paul Hartman wrote: >>>>>> Hi, >>>>>> >>>>>> I got a Nokia N900 linux internet tablet/phone a few days ago, and >>>>>> when I connect it in USB Mass Storage mode to a Windows Vista computer >>>>>> I can write at 17MB/sec, but when I connect it to my Gentoo box my >>>>>> writes are really slow, between 500-900kb/sec depending on if I mount >>>>>> in "sync" mode or not. As far as I know it should be just a totally >>>>>> standard/generic mass storage device. (there were no drivers or >>>>>> software install needed in windows, it just worked) >>>>>> >>>>>> Other USB devices plugged into the same port go full speed, and AFAIK >>>>>> everything appears as if it should be high speed USB 2.0. Has anyone >>>>>> seen something like this before? I'm not sure what the deal is. It >>>>>> takes 20 minutes to copy 1 gigabyte from Linux and takes just under 1 >>>>>> minute to do the same in Windows. >>>>>> >>>>>> I'm not sure about debugging USB or what the options are. Everything >>>>>> I've used previously has worked without any hassle. >>>>> Have you received a lot of debugging messages at the output of dmesg >>>>> when copying files? >>>>> >>>>> Hung >>>> >>>> No errors, no strange messages at all, it seems normal (only slow). I >>>> have other USB devices like SD card reader, external HDD, and they >>>> perform at full speed when plugged into the same port, so it's weird >>>> to me. >>>> >>>> Thanks >>>> Paul >>>> >>>> >>> >>> This isn't that helpful, but in Windows I get good thoroughputs in >>> mass storage mode, but compartively weak ones in sync mode. But this >>> shouldn't be the problem because as far as I know, there are no >>> ync-mode drivers for good old Linux (which is ironic if you consider >>> it). >> >> When I said "sync" mode I mean mounting the device in mass storage >> mode with with "-o sync" (as opposed to the default cached/async >> mode), which I believe is the default in Windows Vista & Win7 (because >> most windows users cannot be bothered to unmount before pulling the >> plug). >> >> Thanks > > Well, after a bit more plugging/unplugging of all my USB devices into > various ports in different orders, it seems to be going fast now. I > hate USB :) > > Thanks for the help
Maybe I spoke too soon. It seems what's happening is when I write a large amount of data, there are several "pdflush" threads at near 100% i/o wait. I'm thinking it's writing multiple streams over USB which is causing the massive slow-down. I'm using 2.6.31, and I see in 2.6.32 there is something called "Per-backing-device based writeback" which may help me here... I'll try the new kernel and report back :)