2003-01-22 19:35:06

by Ben Greear

[permalink] [raw]
Subject: ksoftirqd_CPU0 spinning in 2.4.21-pre3

I happened to notice that my ksoftirqd_CPU0 process started spinning
at 99% CPU when I plugged in the ports to a tulip NIC. I didn't see
any significant amount of interrupts when I looked at /proc/interrupts,
and there was no traffic running.

However, this is also running a hacked up tulip-napi driver, so it
could very well be my problem. I have not seen this on any other kernel
in several months though...

Anyway, if anyone has seen this, I'd like to know. Otherwise, I'll blame
my code and start poking at things...

Thanks,
Ben

--
Ben Greear <[email protected]> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear



2003-01-23 14:49:34

by Robert Olsson

[permalink] [raw]
Subject: ksoftirqd_CPU0 spinning in 2.4.21-pre3


Ben Greear writes:
> I happened to notice that my ksoftirqd_CPU0 process started spinning
> at 99% CPU when I plugged in the ports to a tulip NIC. I didn't see
> any significant amount of interrupts when I looked at /proc/interrupts,
> and there was no traffic running.
>
> However, this is also running a hacked up tulip-napi driver, so it
> could very well be my problem. I have not seen this on any other kernel
> in several months though...
>
> Anyway, if anyone has seen this, I'd like to know. Otherwise, I'll blame
> my code and start poking at things...

Well it can be normal operation if box is highly loaded...

At high loads network interrupts are disabled not to trash performance or
DoS the kernel. Which in turn does succesive polls via RX-softirq to devices
at rate the it can process. So no interrupts when resources are scarce.

The lack of interrupts makes ksoftirqd run the RX-softirq so the network load
becomes visable here. Also review the discussion about ksoftirqd priority.

Cheers.
--ro

2003-01-23 18:23:11

by Ben Greear

[permalink] [raw]
Subject: Re: ksoftirqd_CPU0 spinning in 2.4.21-pre3

Robert Olsson wrote:
> Ben Greear writes:
> > I happened to notice that my ksoftirqd_CPU0 process started spinning
> > at 99% CPU when I plugged in the ports to a tulip NIC. I didn't see
> > any significant amount of interrupts when I looked at /proc/interrupts,
> > and there was no traffic running.
> >
> > However, this is also running a hacked up tulip-napi driver, so it
> > could very well be my problem. I have not seen this on any other kernel
> > in several months though...
> >
> > Anyway, if anyone has seen this, I'd like to know. Otherwise, I'll blame
> > my code and start poking at things...
>
> Well it can be normal operation if box is highly loaded...

There was zero network load on the box. I think there must be a bug in
my napi-ization of the tulip driver. Since I coppied it almost verbatim
from your stuff, you might want to check too :)

Ben

--
Ben Greear <[email protected]> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear


2003-01-24 12:12:26

by Robert Olsson

[permalink] [raw]
Subject: Re: ksoftirqd_CPU0 spinning in 2.4.21-pre3


Ben Greear writes:

> There was zero network load on the box. I think there must be a bug in
> my napi-ization of the tulip driver. Since I coppied it almost verbatim
> from your stuff, you might want to check too :)

If there are no interrupts and ksoftirqd is spinning it smells like
dev->poll never calls netif_rx_complete() --> pure polling.

Cheers.
--ro