Hi all,
The attached thread (apologies for the volume of text, but it is all
relevant) came up on freebsd-xircom last week. Jose Alcaide actually
posted to -mobile on the same subject a week or so before, but got no
response. We figure it's definitely nothing to do with the Xircom driver
in particular and probably nothing to do with pccard, so I'm bouncing it to
any interested kernel gurus.
Essentially, the irq line to which clk0 interrupts are accounted (in the
output from vmstat -i) changes when pccards are inserted/removed. The same
effect has been seen with cards using the xe0 and ed0 drivers.
Any ideas?
Scott
--
===========================================================================
Scott Mitchell | PGP Key ID |"If I can't have my coffee, I'm just
Cambridge, England | 0x54B171B9 | like a dried up piece of roast goat"
[EMAIL PROTECTED] | 0xAA775B8B | -- J. S. Bach.
Hello,
I have just purchased a Xircom RE-100BTX. It works fine, but I found
something very strange. After booting the system (with no pccard inserted),
"vmstat -i" shows:
interrupt total rate
clk0 irq0 718701 100
...
But, just after I insert the Xircom card and it is detected and enabled,
another "vmstat -i" shows:
interrupt total rate
clk0 irq3 732248 110
(IRQ3 is the first available interrupt in my system, and it is assigned
to the Xircom card by the pccardd daemon. I am running FreeBSD 3.4-RELEASE,
no PAO.)
After inserting the card, the clk0 interrupts are accounted to the
interrupt level used by the Xircom card (I have tried other IRQ levels
with the same result). The 100 interrupts/second generated by the
timer are added to the interrupts generated by the Ethernet adapter.
Since I don't have any other PCMCIA cards, I don't know whether this
"problem" only happens with the xe driver or, on the contrary, it is
a general problem of the FreeBSD's pccard driver.
Did anybody find this same behavior?
-- JMA
-----------------------------------------------------------------------
Jos� M� Alcaide | mailto:[EMAIL PROTECTED]
Universidad del Pa�s Vasco | mailto:[EMAIL PROTECTED]
Dpto. de Electricidad y Electr�nica | http://www.we.lc.ehu.es/~jose
Facultad de Ciencias - Campus de Lejona | Tel.: +34-946012479
48940 Lejona (Vizcaya) - SPAIN | Fax: +34-946013071
-----------------------------------------------------------------------
"Beware of Programmers who carry screwdrivers" -- Leonard Brandwein
>After inserting the card, the clk0 interrupts are accounted to the
>interrupt level used by the Xircom card (I have tried other IRQ
levels
>with the same result). The 100 interrupts/second generated by the
>timer are added to the interrupts generated by the Ethernet adapter.
>Since I don't have any other PCMCIA cards, I don't know whether this
>"problem" only happens with the xe driver or, on the contrary, it is
>a general problem of the FreeBSD's pccard driver.
Hmmm.... taking a quick look at my 'vmstat -i' output I see the same
thing:
clk0 irq10 2667404 102
----bunch of others deleted----
IRQ10 is the IRQ I hooked to my RealPort.
I'll give the ed0 card I have at home a shot tonight.
DocWilco
On Tue, Jan 25, 2000 at 05:31:08PM +0100, ROGIER MULHUIJZEN wrote:
> >After inserting the card, the clk0 interrupts are accounted to the
> >interrupt level used by the Xircom card (I have tried other IRQ
> levels
> >with the same result). The 100 interrupts/second generated by the
> >timer are added to the interrupts generated by the Ethernet adapter.
> >Since I don't have any other PCMCIA cards, I don't know whether this
> >"problem" only happens with the xe driver or, on the contrary, it is
> >a general problem of the FreeBSD's pccard driver.
>
> Hmmm.... taking a quick look at my 'vmstat -i' output I see the same
> thing:
>
> clk0 irq10 2667404 102
> ----bunch of others deleted----
>
> IRQ10 is the IRQ I hooked to my RealPort.
>
> I'll give the ed0 card I have at home a shot tonight.
Another data point:
Script started on Wed Jan 26 21:18:22 2000
orac 78 ~> vmstat -i
interrupt total rate
clk0 irq3 23175 99
rtc0 irq8 29662 127
fdc0 irq6 1 0
wdc0 irq14 1934 8
atkbd0 irq1 468 2
psm0 irq12 9 0
Total 55249 238
[xe0 inserted here]
orac 79 ~> vmstat -i
interrupt total rate
clk0 irq10 33303 100
rtc0 irq8 42600 127
fdc0 irq6 1 0
wdc0 irq14 2088 6
atkbd0 irq1 501 1
psm0 irq12 9 0
Total 78502 235
orac 80 ~> exit
irq3 is where my pccard controller typically lives; irq10 is (of course)
the line occupied by xe0. I'll be interested to see what happens with
Rogier's ed0 (I should probably borrow a 3Com card from work and try the
same thing) but I suspect this is a case of the generic pccard code being
weird rather than anything specific to the xe0 driver. Our code doesn't do
much with interrupts except handle them when they go off :-) All the setup
stuff is done by pccardd before xe get a look in...
Scott
--
===========================================================================
Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England | 0x54B171B9 | don't get sucked into jet engines"
[EMAIL PROTECTED] | 0xAA775B8B | -- Anon
> irq3 is where my pccard controller typically lives; irq10 is (of course)
> the line occupied by xe0. I'll be interested to see what happens with
> Rogier's ed0 (I should probably borrow a 3Com card from work and try the
> same thing) but I suspect this is a case of the generic pccard code being
> weird rather than anything specific to the xe0 driver. Our code doesn't do
> much with interrupts except handle them when they go off :-) All the setup
> stuff is done by pccardd before xe get a look in...
>
Hmmmm, my dmesg output says:
pcic: controller irq 3
And as you can see below clk0 is on irq 7...
Anyways here is the log of vmstat -i's with my RealPort in xe0 mode, my
ed0 card and my RealPort in sio mode:
After a clean boot:
interrupt total rate
clk0 irq7 15771 100
rtc0 irq8 20182 128
wdc0 irq14 2826 18
fdc0 irq6 1 0
atkbd0 irq1 495 3
psm0 irq12 4503 28
ppc0 irq5 1 0
stray irq4 1 0
Total 43780 278
After insertion of my RealPort in xe0 mode:
interrupt total rate
clk0 irq10 23540 100
rtc0 irq8 30124 128
wdc0 irq14 2858 12
fdc0 irq6 1 0
atkbd0 irq1 708 3
psm0 irq12 8715 37
ppc0 irq5 1 0
stray irq4 1 0
Total 65948 280
After a ping -f of another host:
interrupt total rate
clk0 irq10 52835 144
rtc0 irq8 46783 128
wdc0 irq14 2906 7
fdc0 irq6 1 0
atkbd0 irq1 1084 2
psm0 irq12 11997 32
ppc0 irq5 1 0
stray irq4 1 0
Total 115608 316
After a reboot with RealPort inserted in sio mode:
interrupt total rate
clk0 irq7 15470 101
rtc0 irq8 19656 128
wdc0 irq14 2841 18
fdc0 irq6 1 0
atkbd0 irq1 425 2
psm0 irq12 2550 16
ppc0 irq5 1 0
stray irq4 1 0
Total 40945 267
After a ping -f over ppp:
interrupt total rate
clk0 irq7 23016 126
rtc0 irq8 23286 127
wdc0 irq14 2864 15
fdc0 irq6 1 0
atkbd0 irq1 563 3
psm0 irq12 2550 14
ppc0 irq5 1 0
stray irq4 1 0
Total 52282 287
Here is my pccard.conf entry for my RealPort:
card "Xircom" "16-bit Ethernet + Modem 56"
config 0x17 "sio1" 10
# config 0x27 "xe0" 10
insert echo Xircom CreditCard Modem inserted
remove echo Xircom CreditCard Modem removed
Note that the sio driver has irq 10 configured, but that it doesn't show
up on the vmstat list, but that the rate gets skewed a LOT. (The ping -f
generated a few interrupt-level buffer overflows)
I think we can safely say that this is either something in vmstat, or in
pccardd. Warner, what's your take on this?
DocWilco (It's weird being called Rogier online =) )
drwilco wrote:
> [...]
>
> I think we can safely say that this is either something in vmstat, or in
> pccardd. Warner, what's your take on this?
>
I absolutely agree. The problem is not in the xe driver.
I have carefully examined the vmstat and pccard sources. Vmstat is
innocent; it simply uses kvm_read(), so the interrupt accounting is
messed up in the kernel memory. Pccardd has nothing to do with
interrupt registration; this support is in the pccard driver. And
with respect to pccard, the calls to register_intr() appear to be OK.
Really, I have no idea of where is the problem. We need a kernel guru :-)
This thread should be moved to -mobile, I think.
-- JMA
-----------------------------------------------------------------------
Jos� M� Alcaide | mailto:[EMAIL PROTECTED]
Universidad del Pa�s Vasco | mailto:[EMAIL PROTECTED]
Dpto. de Electricidad y Electr�nica | http://www.we.lc.ehu.es/~jose
Facultad de Ciencias - Campus de Lejona | Tel.: +34-946012479
48940 Lejona (Vizcaya) - SPAIN | Fax: +34-946013071
-----------------------------------------------------------------------
"Beware of Programmers who carry screwdrivers" -- Leonard Brandwein