Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Hiroaki SHIMODA
On Wed, 30 May 2012 16:49:02 +0200 Eric Dumazet wrote: > On Wed, 2012-05-30 at 20:29 +0900, Hiroaki SHIMODA wrote: > > On Wed, 30 May 2012 13:08:27 +0200 > > Eric Dumazet wrote: > > > > > On Wed, 2012-05-30 at 19:43 +0900, Hiroaki SHIMODA wrote: > > > > > > > While examining ping problem, belo

Re: [E1000-devel] Intel 82574L rx_short_length_errors

2012-05-30 Thread Terry Hardie
The problem is that is only happens on servers getting a reasonable (> ~5000 pps and greater than 50Mbit). So, idle servers’ error counters do not increase. Nonetheless, I still tried a sniff on a server getting at least 1 rx_short_length_errors per second. I could not find any anomalies in the

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread dave taht
On 05/30/2012 07:49 AM, Eric Dumazet wrote: > On Wed, 2012-05-30 at 20:29 +0900, Hiroaki SHIMODA wrote: >> On Wed, 30 May 2012 13:08:27 +0200 >> Eric Dumazet wrote: >> >>> On Wed, 2012-05-30 at 19:43 +0900, Hiroaki SHIMODA wrote: >>> While examining ping problem, below pattern is often observ

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Joe Perches
On Wed, 2012-05-30 at 16:42 +0200, Eric Dumazet wrote: > On Wed, 2012-05-30 at 07:09 -0700, Joe Perches wrote: > > > Whatever evals A and B once would be better. > > Why do you believe they could be evaluated several time ? > > #define POSDIFF(A, B) max_t(int, (A) - (B), 0) I don't and didn't s

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 20:29 +0900, Hiroaki SHIMODA wrote: > On Wed, 30 May 2012 13:08:27 +0200 > Eric Dumazet wrote: > > > On Wed, 2012-05-30 at 19:43 +0900, Hiroaki SHIMODA wrote: > > > > > While examining ping problem, below pattern is often observed. > > > > > >

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 07:09 -0700, Joe Perches wrote: > Whatever evals A and B once would be better. Why do you believe they could be evaluated several time ? #define POSDIFF(A, B) max_t(int, (A) - (B), 0) (A) - (B) is done once, or its a huge max_t() bug. By the way, we handle 32bit values he

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Joe Perches
On Wed, 2012-05-30 at 13:59 +0200, Eric Dumazet wrote: > On Wed, 2012-05-30 at 04:20 -0700, Joe Perches wrote: > > On Wed, 2012-05-30 at 13:08 +0200, Eric Dumazet wrote: > > > Maybe we should change all POSDIFF(), not selected ones. > > > #define POSDIFF(A, B) ((int)((A) - (B)) > 0 ? (A) - (B) : 0)

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 04:20 -0700, Joe Perches wrote: > On Wed, 2012-05-30 at 13:08 +0200, Eric Dumazet wrote: > > Maybe we should change all POSDIFF(), not selected ones. > > #define POSDIFF(A, B) ((int)((A) - (B)) > 0 ? (A) - (B) : 0) > > maybe use an eval once statement expression macro > ({ >

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Hiroaki SHIMODA
On Wed, 30 May 2012 13:08:27 +0200 Eric Dumazet wrote: > On Wed, 2012-05-30 at 19:43 +0900, Hiroaki SHIMODA wrote: > > > While examining ping problem, below pattern is often observed. > > > >TIME > >dql_queued() dql_completed()

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Joe Perches
On Wed, 2012-05-30 at 13:08 +0200, Eric Dumazet wrote: > Maybe we should change all POSDIFF(), not selected ones. > #define POSDIFF(A, B) ((int)((A) - (B)) > 0 ? (A) - (B) : 0) maybe use an eval once statement expression macro ({ typeof (A) _a = (A); typeof (B) _b = (B); ((

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread David Laight
> > + num_queued = dql->num_queued; > > > I suggest : > > num_queued = ACCESS_ONCE(dql->num_queued); > > Or else compiler is free to do whatever he wants. Or make the structure member volatile, then the compiler can only read it once. Probably worth while if the value is expect

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 13:04 +0200, Eric Dumazet wrote: > Please don't use lazy volatile. > > Unless you really want Linus flames (and ours) > > ACCESS_ONCE() is much cleaner. > http://yarchive.net/comp/linux/ACCESS_ONCE.html --

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 19:43 +0900, Hiroaki SHIMODA wrote: > While examining ping problem, below pattern is often observed. > >TIME >dql_queued() dql_completed() | > a) initial state | >

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 11:52 +0100, David Laight wrote: > > > + num_queued = dql->num_queued; > > > > > > I suggest : > > > > num_queued = ACCESS_ONCE(dql->num_queued); > > > > Or else compiler is free to do whatever he wants. > > Or make the structure member volatile, then the > compil

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Hiroaki SHIMODA
On Wed, 30 May 2012 10:40:31 +0200 Eric Dumazet wrote: > On Wed, 2012-05-30 at 09:06 +0900, Hiroaki SHIMODA wrote: > > While reading the bql code, I have some questions. > > > > 1) dql_completed() and dql_queued() can be called concurrently, > >so dql->num_queued could change while processin

Re: [E1000-devel] Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e

2012-05-30 Thread Eric Dumazet
On Wed, 2012-05-30 at 09:06 +0900, Hiroaki SHIMODA wrote: > While reading the bql code, I have some questions. > > 1) dql_completed() and dql_queued() can be called concurrently, >so dql->num_queued could change while processing >dql_completed(). >Is it intentional to refer num_queued