Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#3942 - 16/04/2000 19:33 Linux, SMP, USB and emptool
rjlov
member

Registered: 16/12/1999
Posts: 188
Loc: Melbourne, Australia

Here's an interesting fact. If anyone as an idea of how I could fix things better, I'd be happy to hear it.

I recently bought a new motherboard, and it has two CPUs and USB. Previously I was using the USB port on a house-mate's computer with kernel 2.3.99pre2. With two CPUs (still 2.3.99pre2), all of a sudden emptool couldn't download the databases any more. It kept on giving me errors (with --debug on) similar (I'm not actually using the same machine at the moment) to
timeout in state 3 (substate x)

I suspected this might be (somehow) due to the second CPU. After a lot of bumbling around, I eventually hit upon the idea of setting the SMP affinity of the USB IRQ to only one CPU.
e.g. echo 1 > /proc/irq/19/smp_affinity

This sort of fixed the problem. I still can't use emptool with debug turned off (similar symptoms to before I changed the IRQ SMP affinity), but if I use "--debug 1" then I get the odd timeout message (every 10 times I start emptool or so) but basically it works.

I have not yet grokked the empeg-car.c code, and I was wondering if anybody could see an obvious solution to the problem (I'd prefer it to work without mucking around with the IRQ as above). It also seems to be related (somehow) to emptool itself, as turning the debug on and off affects the behaviour. It could just be timing related, I guess.

Any ideas?
Thanks
Richard.


Top
#3943 - 17/04/2000 02:45 Re: Linux, SMP, USB and emptool [Re: rjlov]
schofiel
carpal tunnel

Registered: 25/06/1999
Posts: 2993
Loc: Wareham, Dorset, UK
emptool could be re-compiled with thread-safe libraries?

_________________________
One of the few remaining Mk1 owners... #00015

Top
#3944 - 18/04/2000 05:22 Re: Linux, SMP, USB and emptool [Re: rjlov]
john
stranger

Registered: 22/07/1999
Posts: 37
Loc: London, UK
I'm having great difficulties myself getting emptool to work with the latest kernel usb drivers. It basically seems to get a little way and then blocks every 512 bytes or so. I have no idea why it's doing this. The problem's also there using the generic usb-serial driver so I can only assume there's a problem with the kernel code somewhere :)

There's a hell of a lot of kernel code to look through to figure out why this is happening, but at some point I'll have to figure it out because it's getting annoying having to use one of the windows machines to upload new stuff...


- John (from empeg)

(The above may not represent the views of empeg :)

Top
#3945 - 18/04/2000 17:26 Re: Linux, SMP, USB and emptool [Re: john]
rjlov
member

Registered: 16/12/1999
Posts: 188
Loc: Melbourne, Australia
I haven't tried using 2.3.99pre5 yet. Is that the one you're having trouble with? I had no problems at all using the pre2 usb drivers on a single processor machine (this was using the non-alternate uhci driver).

Actually you might know this, John. Do you have any idea why the alternate uhci driver is much slower than the non-alternate one? On my machine it's almost an order of magnitude slower.

Richard


Top