* NIC inerrupt
@ 2004-04-19 12:46 John Que
2004-04-19 12:54 ` Denis Vlasenko
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: John Que @ 2004-04-19 12:46 UTC (permalink / raw)
To: linux-kernel
Hello,
I want to count the number of times I reach an NIC receive
interrupt.
I added a global static variable of type int , and initialized
it to 0 ; each time I am in the rx_interrupt of the card I incerement
it by one;
I got large , non sensible numbers after one or two seconds;
So for debug I added printk each time I increment it in rx_interrupt.
What I see is that there are unreasonable jumps in the number
for instance , it inceremnts sequntially from 1 to 80,then jums to 4500,
increments a little sequentially to 4580, and the jums again to
11000 ;
Is it got to do with it that this is in interrupt?
Any idea what it can be ?
(I also tried to declare it as static in the rx_interrupt method
and the same happened)
Thnx,
John
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: NIC inerrupt
2004-04-19 12:46 NIC inerrupt John Que
@ 2004-04-19 12:54 ` Denis Vlasenko
2004-04-19 14:40 ` Bart Samwel
2004-04-20 14:04 ` Axel Weiß
2 siblings, 0 replies; 6+ messages in thread
From: Denis Vlasenko @ 2004-04-19 12:54 UTC (permalink / raw)
To: John Que, linux-kernel
On Monday 19 April 2004 15:46, John Que wrote:
> Hello,
>
> I want to count the number of times I reach an NIC receive
> interrupt.
>
> I added a global static variable of type int , and initialized
> it to 0 ; each time I am in the rx_interrupt of the card I incerement
> it by one;
> I got large , non sensible numbers after one or two seconds;
>
> So for debug I added printk each time I increment it in rx_interrupt.
>
> What I see is that there are unreasonable jumps in the number
>
> for instance , it inceremnts sequntially from 1 to 80,then jums to 4500,
> increments a little sequentially to 4580, and the jums again to
> 11000 ;
>
> Is it got to do with it that this is in interrupt?
> Any idea what it can be ?
>
>
> (I also tried to declare it as static in the rx_interrupt method
> and the same happened)
Show your code
--
vda
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NIC inerrupt
2004-04-19 12:46 NIC inerrupt John Que
2004-04-19 12:54 ` Denis Vlasenko
@ 2004-04-19 14:40 ` Bart Samwel
2004-04-20 14:04 ` Axel Weiß
2 siblings, 0 replies; 6+ messages in thread
From: Bart Samwel @ 2004-04-19 14:40 UTC (permalink / raw)
To: John Que; +Cc: linux-kernel
John Que wrote:
> Hello,
>
> I want to count the number of times I reach an NIC receive
> interrupt.
>
> I added a global static variable of type int , and initialized
> it to 0 ; each time I am in the rx_interrupt of the card I incerement
> it by one;
> I got large , non sensible numbers after one or two seconds;
>
> So for debug I added printk each time I increment it in rx_interrupt.
>
> What I see is that there are unreasonable jumps in the number
>
> for instance , it inceremnts sequntially from 1 to 80,then jums to 4500,
> increments a little sequentially to 4580, and the jums again to
> 11000 ;
>
> Is it got to do with it that this is in interrupt?
> Any idea what it can be ?
You're probably reading the kernel output from syslog. Syslog
periodically reads out the printks from the kernel. With the amount of
printks you're doing you are probably printing info for about 4500
interrupts between every time syslog checks for new kernel output, while
the kernel buffer that is used to store this information can only handle
enough data for 80 interrupts.
--Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NIC inerrupt
2004-04-19 12:46 NIC inerrupt John Que
2004-04-19 12:54 ` Denis Vlasenko
2004-04-19 14:40 ` Bart Samwel
@ 2004-04-20 14:04 ` Axel Weiß
2004-04-20 15:41 ` Richard B. Johnson
2 siblings, 1 reply; 6+ messages in thread
From: Axel Weiß @ 2004-04-20 14:04 UTC (permalink / raw)
To: John Que; +Cc: linux-kernel
Am Montag, 19. April 2004 14:46 schrieb John Que:
> Hello,
>
> I want to count the number of times I reach an NIC receive
> interrupt.
>
> I added a global static variable of type int , and initialized
> it to 0 ; each time I am in the rx_interrupt of the card I incerement
> it by one;
> I got large , non sensible numbers after one or two seconds;
>
> So for debug I added printk each time I increment it in rx_interrupt.
>
> What I see is that there are unreasonable jumps in the number
>
> for instance , it inceremnts sequntially from 1 to 80,then jums to 4500,
> increments a little sequentially to 4580, and the jums again to
> 11000 ;
>
> Is it got to do with it that this is in interrupt?
> Any idea what it can be ?
>
>
> (I also tried to declare it as static in the rx_interrupt method
> and the same happened)
Probably you didn't declare your count variable 'volatile'?
Axel
--
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NIC inerrupt
2004-04-20 14:04 ` Axel Weiß
@ 2004-04-20 15:41 ` Richard B. Johnson
0 siblings, 0 replies; 6+ messages in thread
From: Richard B. Johnson @ 2004-04-20 15:41 UTC (permalink / raw)
To: Axel Weiß; +Cc: John Que, Linux kernel
On Tue, 20 Apr 2004, Axel [iso-8859-15] Weiß wrote:
> Am Montag, 19. April 2004 14:46 schrieb John Que:
> > Hello,
> >
> > I want to count the number of times I reach an NIC receive
> > interrupt.
> >
> > I added a global static variable of type int , and initialized
> > it to 0 ; each time I am in the rx_interrupt of the card I incerement
> > it by one;
> > I got large , non sensible numbers after one or two seconds;
> >
> > So for debug I added printk each time I increment it in rx_interrupt.
> >
> > What I see is that there are unreasonable jumps in the number
> >
> > for instance , it inceremnts sequntially from 1 to 80,then jums to 4500,
> > increments a little sequentially to 4580, and the jums again to
> > 11000 ;
> >
> > Is it got to do with it that this is in interrupt?
> > Any idea what it can be ?
> >
> >
> > (I also tried to declare it as static in the rx_interrupt method
> > and the same happened)
>
> Probably you didn't declare your count variable 'volatile'?
>
> Axel
>
> --
> Humboldt-Universität zu Berlin
> Institut für Informatik
> Signalverarbeitung und Mustererkennung
> Dipl.-Inf. Axel Weiß
> Rudower Chaussee 25
> 12489 Berlin-Adlershof
> +49-30-2093-3050
How about `cat /proc/interrupts`. That should tell him how
many interrupts the NIC got..
CPU0
0: 123073 IO-APIC-edge timer
1: 1131 IO-APIC-edge keyboard
2: 0 XT-PIC cascade
17: 18550 IO-APIC-level BusLogic BT-958
18: 69272 IO-APIC-level eth0 <----------
NMI: 0
LOC: 123029
ERR: 0
MIS: 0
Do the simple stuff first. Only get compilcated if necessary.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5596.77 BogoMips).
Note 96.31% of all statistics are fiction.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: NIC inerrupt
@ 2004-04-19 15:01 John Que
0 siblings, 0 replies; 6+ messages in thread
From: John Que @ 2004-04-19 15:01 UTC (permalink / raw)
To: bart; +Cc: linux-kernel
Hello,
thnxs;
You are right in that I send about 4500-5000 packets in a second.
I will try to print it every 1000 packets and see.
john
>From: Bart Samwel <bart@samwel.tk>
>To: John Que <qwejohn@hotmail.com>
>CC: linux-kernel@vger.kernel.org
>Subject: Re: NIC inerrupt
>Date: Mon, 19 Apr 2004 16:40:08 +0200
>
>
>
>John Que wrote:
>>Hello,
>>
>>I want to count the number of times I reach an NIC receive
>>interrupt.
>>
>>I added a global static variable of type int , and initialized
>>it to 0 ; each time I am in the rx_interrupt of the card I incerement
>>it by one;
>>I got large , non sensible numbers after one or two seconds;
>>
>>So for debug I added printk each time I increment it in rx_interrupt.
>>
>>What I see is that there are unreasonable jumps in the number
>>
>>for instance , it inceremnts sequntially from 1 to 80,then jums to 4500,
>>increments a little sequentially to 4580, and the jums again to
>>11000 ;
>>
>>Is it got to do with it that this is in interrupt?
>>Any idea what it can be ?
>
>You're probably reading the kernel output from syslog. Syslog periodically
>reads out the printks from the kernel. With the amount of printks you're
>doing you are probably printing info for about 4500 interrupts between
>every time syslog checks for new kernel output, while the kernel buffer
>that is used to store this information can only handle enough data for 80
>interrupts.
>
>--Bart
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-04-20 15:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-19 12:46 NIC inerrupt John Que
2004-04-19 12:54 ` Denis Vlasenko
2004-04-19 14:40 ` Bart Samwel
2004-04-20 14:04 ` Axel Weiß
2004-04-20 15:41 ` Richard B. Johnson
-- strict thread matches above, loose matches on Subject: below --
2004-04-19 15:01 John Que
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox