From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jesper Dangaard Brouer <hawk@comx.dk>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, jeffrey.t.kirsher@intel.com
Subject: Re: [net-next PATCH] igb: update adapter stats when reading /proc/net/dev.
Date: Thu, 07 Oct 2010 12:24:44 +0200 [thread overview]
Message-ID: <1286447084.2912.24.camel@edumazet-laptop> (raw)
In-Reply-To: <1286446004.6992.7.camel@firesoul.comx.local>
Le jeudi 07 octobre 2010 à 12:06 +0200, Jesper Dangaard Brouer a écrit :
> On Wed, 2010-10-06 at 23:46 -0700, David Miller wrote:
> > From: Eric Dumazet <eric.dumazet@gmail.com>
> > Date: Thu, 07 Oct 2010 08:44:08 +0200
> >
> > > Le mercredi 06 octobre 2010 à 23:36 -0700, David Miller a écrit :
> > >> From: Jesper Dangaard Brouer <hawk@comx.dk>
> > >> Date: Tue, 05 Oct 2010 16:18:33 +0200
> > >>
> > >> > Network driver igb: Improve the accuracy of stats in /proc/net/dev, by
> > >> > updating the adapter stats when reading /proc/net/dev. Currently the
> > >> > stats are updated by the watchdog timer every 2 sec, or when getting
> > >> > stats via ethtool -S.
> > >> >
> > >> > A number of userspace apps read these /proc/net/dev stats every second,
> > >> > e.g. ifstat, which then gives a perceived very bursty traffic pattern,
> > >> > which is actually false.
> > >> >
> > >> > Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
> > >>
> > >> I assume that the Intel folks will take care of integrating this
> > >> now that the locking is fixed.
> > >
> > > I integrated Jesper patch into my cumulative patch.
> >
> > Ok.
>
> I'm fine with this, as long as the commit message describe this change
> of accuracy of stats in /proc/net/dev.
>
> Something like:
>
> This patch also increase the accuracy of stats in /proc/net/dev, by
> updating the adapter stats when reading /proc/net/dev. Previously
> the stats were only updated by the watchdog timer every 2 sec, which
> resulted in false observations from userspace.
>
>
Well, its not exactly true :)
Previously, igb stats were updated :
- By watchdog timer, every 2 secs
- Every time an "ethtool -S ethX" was done
There is no general guarantee netdev stats are immediately available to
user.
ndo_get_stats() is not allowed to sleep, (because of bonding...), so
drivers can not always provide accurate stats, if they need to make a
long transaction with hardware.
Other drivers do the same (provide hardware statistics), with about one
second resolution.
So the "resulted in false observations from userspace." is something
that might upset admins, but is not a hard requirement of netdev stats.
next prev parent reply other threads:[~2010-10-07 10:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 14:18 [net-next PATCH] igb: update adapter stats when reading /proc/net/dev Jesper Dangaard Brouer
2010-10-05 14:41 ` Eric Dumazet
2010-10-05 14:53 ` Jesper Dangaard Brouer
2010-10-05 15:19 ` Eric Dumazet
2010-10-05 21:01 ` Eric Dumazet
2010-10-05 21:16 ` Jesper Dangaard Brouer
2010-10-05 22:34 ` Jeff Kirsher
2010-10-06 3:28 ` Eric Dumazet
2010-10-06 4:36 ` [PATCH net-next] igb: fix stats handling Eric Dumazet
2010-10-06 5:49 ` Jeff Kirsher
2010-10-06 11:36 ` Jesper Dangaard Brouer
2010-10-09 23:57 ` Tantilov, Emil S
2010-10-10 8:14 ` [PATCH net-next V2] " Eric Dumazet
2010-10-12 0:12 ` Jeff Kirsher
2010-10-06 5:47 ` [net-next PATCH] igb: update adapter stats when reading /proc/net/dev Jeff Kirsher
2010-10-07 6:36 ` David Miller
2010-10-07 6:44 ` Eric Dumazet
2010-10-07 6:46 ` David Miller
2010-10-07 10:06 ` Jesper Dangaard Brouer
2010-10-07 10:24 ` Eric Dumazet [this message]
2010-10-07 11:36 ` Jesper Dangaard Brouer
-- strict thread matches above, loose matches on Subject: below --
2010-01-12 13:41 Jesper Dangaard Brouer
2010-01-14 1:30 ` David Miller
2010-01-14 3:01 ` Jeff Kirsher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286447084.2912.24.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=hawk@comx.dk \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox