Messages in this thread | | | Date | Wed, 05 Mar 2008 16:00:23 -0600 | From | "Chris Friesen" <> | Subject | Re: E1000: e1000_update_stats() |
| |
Kok, Auke wrote:
> the update_stats function is only called every two seconds, and scheduled once. I > think that the chance that two of these functions run in contention in the way you > point out are practically zero, and if they do then we have much bigger problems > than just counters being wrong...
I recently did an investigation that ended up sampling a subset of those stats every millisecond (to get an accurate picture of how many packets were being arriving vs being dropped due to rx_fifo errors over short intervals). Ultimately it turned out that we had very bursty traffic. So it's not entirely unheard-of to sample at much higher rates.
At the very least, if we're going to remove the atomicity of reading registers and updating stats, how about adding a comment to this effect in the code?
Chris
| |