public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: minor e1000 bug
@ 2003-12-22 19:30 Feldman, Scott
  2003-12-22 19:52 ` Ethan Weinstein
  0 siblings, 1 reply; 9+ messages in thread
From: Feldman, Scott @ 2003-12-22 19:30 UTC (permalink / raw)
  To: Ethan Weinstein; +Cc: Hans-Peter Jansen, linux-kernel

> This modification appears to somewhat remedy the problem, however, 
> bandwidth measurement seems to be much more accurate with many other 
> cards.  By what method does, say, the 3c59x card export its 
> statistics 
> to /proc/net/dev that makes it easier to measure?

e100 and e1000 both query h/w for stats on a timer (2 seconds) and cache
the results.  A call into the driver's get_stats function just returns
these cached values.  With e100, there is a problem in that issuing the
command to dump stats doesn't return right away, so rather than blocking
in the driver by waiting for the command to complete, the driver just
reads the results of the dump command 2 seconds prior, and then reissues
a new dump command.  So e100 stats are delayed by ~2 seconds.

3c59x (and others) query the h/w for stats in the driver's get_stats
function directly.  This gives up-to-date stats.  We could do this with
e1000, but it'll take a little bit of surgery because there is some
other code in the driver that is dependent on stats collected over 2
second period.  Nothing that can't be fixed.

-scott

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <C6F5CF431189FA4CBAEC9E7DD5441E0103424209@orsmsx402.jf.intel.com>]
* RE: minor e1000 bug
@ 2003-12-22  5:26 Feldman, Scott
  2003-12-22 10:26 ` Hans-Peter Jansen
  2003-12-22 15:26 ` Ethan Weinstein
  0 siblings, 2 replies; 9+ messages in thread
From: Feldman, Scott @ 2003-12-22  5:26 UTC (permalink / raw)
  To: Hans-Peter Jansen, Ethan Weinstein, linux-kernel

> I would also be interested in a statement from intel fellows on the 
> reasoning behind this decision, since every user of gkrellm will 
> notice some strange behaviour (value oscillating between 0 and 
> throughput * 2). (Poor man's real time bandwidth management ;-). 
> 
> After being tired of cognitive interpretation of these values, I 
> decided to fix it, which was pretty easy:
> 
> --- linux-2.4.20/drivers/net/e1000/e1000_main.c~    
> 2003-08-03 00:40:21.000000000 +0200
> +++ linux-2.4.20/drivers/net/e1000/e1000_main.c 2003-08-08 
> +++ 13:20:06.000000000 +0200
> @@ -1390,7 +1390,7 @@
>         netif_stop_queue(netdev);
>  
>     /* Reset the timer */
> -   mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);
> +   mod_timer(&adapter->watchdog_timer, jiffies + HZ);
>  }

That should be OK if you're not linked at half duplex or using a 82541/7
Ethernet controller.  e1000_smartspeed() and e1000_adaptive_ifs() are
sensitive to the watchdog interval, so we'll need to make sure those are
OK before adjusting the timer from 2 to 1 seconds.  This issue is
tracker here: http://bugme.osdl.org/show_bug.cgi?id=1192.

-scott

^ permalink raw reply	[flat|nested] 9+ messages in thread
* minor e1000 bug
@ 2003-12-19 20:40 Ethan Weinstein
  2003-12-20 12:46 ` Hans-Peter Jansen
  0 siblings, 1 reply; 9+ messages in thread
From: Ethan Weinstein @ 2003-12-19 20:40 UTC (permalink / raw)
  To: linux-kernel

I've noticed that the e1000 driver does not update the counters in
/proc/net/dev as quickly as several other drivers I've tried, such as
e100 (both the Becker driver, and Intel's), sk90lin, and 3c59x. These
drivers seem to update the counters in a very timely fashion while the
e1000 driver doesn't seem to update them for several seconds.  This is
apparent in 2.6.0, and 2.4.xx. Is there an update interval that might be
modified within the driver to fix this?  It screws up realtime bandwidth
measurements for these cards.


-Ethan


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

end of thread, other threads:[~2003-12-24  2:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-22 19:30 minor e1000 bug Feldman, Scott
2003-12-22 19:52 ` Ethan Weinstein
     [not found] <C6F5CF431189FA4CBAEC9E7DD5441E0103424209@orsmsx402.jf.intel.com>
2003-12-24  0:29 ` Feldman, Scott
2003-12-23 14:54   ` Ethan Weinstein
  -- strict thread matches above, loose matches on Subject: below --
2003-12-22  5:26 Feldman, Scott
2003-12-22 10:26 ` Hans-Peter Jansen
2003-12-22 15:26 ` Ethan Weinstein
2003-12-19 20:40 Ethan Weinstein
2003-12-20 12:46 ` Hans-Peter Jansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox