linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* e1000 statistics timer
@ 2003-08-02 19:45 Carsten Otto
  2003-08-02 20:57 ` Zwane Mwaikambo
  2003-08-02 23:14 ` Marc-Christian Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Carsten Otto @ 2003-08-02 19:45 UTC (permalink / raw)
  To: linux-kernel

Hello!
I own two Intel Gigabit cards running with the e1000 driver.
The only problem is the statistics for ifconfig (RX bytes, TX bytes) and 
for other programs like gkrellm, bwmon, ... are only updated every _two_ 
seconds.
This results in a strange display. When the real traffic is at constant 
10MB/sec every program displays:
"0 - 20MB/sec - 0 - 20MB/sec - ..."
So, every two seconds the total of the last two seconds. Between that 
just nothing.

After a while I got too annoyed and tried to change that.
In e1000_main.c you can find the line (number 1424):

"mod_timer(&adapter->watchdog_timer, jiffies + 2* HZ);"

I don't really understand driver programming, but HZ is 100 and means 1 
second.
Changing this line to "... + 1* HZ" resulted  in a better behaviour. I 
got "a - b - c - d - 0 - e - f  - g - h - 0 - ..." where the letters are 
quite correct numbers, every fifth value is zero.
The next step was deleting these "jiffies" (what are these?).
Final result:

"mod_timer(&adapter->watchdog_timer, HZ);"

With this line (and the new kernel of course) I get everything what I 
need. All programs display the bandwith like they do with my other NICs.

Now my questions:
1) Is my implementation right? It works...
2) Can I change that delay to 1 sec withhout "hurting someone"?
3) What are these jiffies? Mathematically they are about 20 :>
4) There are other timers in the code, that use "jiffies + 2 * HZ" too. 
Should they  be changed, too?

IMPORTANT:
Please answer to c-otto@gmx.de, because I don't get the whole LKML.

Thanks,
Carsten Otto

PS:
My kernel is 2.4.20 wolk4.2s
CPUs are Durons


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: e1000 statistics timer
  2003-08-02 19:45 e1000 statistics timer Carsten Otto
@ 2003-08-02 20:57 ` Zwane Mwaikambo
  2003-08-02 23:14 ` Marc-Christian Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Zwane Mwaikambo @ 2003-08-02 20:57 UTC (permalink / raw)
  To: Carsten Otto; +Cc: linux-kernel

On Sat, 2 Aug 2003, Carsten Otto wrote:

> "mod_timer(&adapter->watchdog_timer, jiffies + 2* HZ);"

> "mod_timer(&adapter->watchdog_timer, HZ);"

After HZ jiffies have passed you're adding a timer to trigger in the past.

> Now my questions:
> 1) Is my implementation right? It works...

That is often the case with lots of software, it may be wrong but by 
$DEITY's gracious hand, still 'works'

> 2) Can I change that delay to 1 sec withhout "hurting someone"?

Dunno, try jiffies + HZ, they're just statistics

> 3) What are these jiffies? Mathematically they are about 20 :>

jiffies is the global variable which stores how many timer ticks have 
occured since system startup.

> 4) There are other timers in the code, that use "jiffies + 2 * HZ" too. 
> Should they  be changed, too?

Nooo!! =)

> IMPORTANT:
> Please answer to c-otto@gmx.de, because I don't get the whole LKML.

Have fun,
	Zwane

-- 
function.linuxpower.ca

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: e1000 statistics timer
  2003-08-02 19:45 e1000 statistics timer Carsten Otto
  2003-08-02 20:57 ` Zwane Mwaikambo
@ 2003-08-02 23:14 ` Marc-Christian Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Marc-Christian Petersen @ 2003-08-02 23:14 UTC (permalink / raw)
  To: Carsten Otto, linux-kernel

On Saturday 02 August 2003 21:45, Carsten Otto wrote:

Hi Carsten,

well, Zwane already said all needed things, so ... :)

> My kernel is 2.4.20 wolk4.2s

cool! BTW: 4.4s is actual ;) ... 4.4 has updated e1000 driver though it won't 
fix your "problem".

ciao, Marc


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-02 23:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-02 19:45 e1000 statistics timer Carsten Otto
2003-08-02 20:57 ` Zwane Mwaikambo
2003-08-02 23:14 ` Marc-Christian Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).