Subject: Re: [RFC/PATCH] sungem: Spring cleaning and GRO support

From: Benjamin Herrenschmidt <[email-masked]>
Date: Wed, 01 Jun 2011 16:24:25 +1000

On Tue, 2011-05-31 at 19:41 -0700, David Miller wrote:
> From: Benjamin Herrenschmidt <[email-masked]>
> Date: Tue, 31 May 2011 17:59:05 +1000
> 
> > Now the results .... on a dual G5 machine with a 1000Mb link, no
> > measurable netperf difference on Rx and a 3% loss on Tx.
> > 
> > So taking the lock is the Tx path hurts...
> 
> It shouldn't.  You're replacing one lock with another, and in fact
> because TX reclaim occurs in softirq context (and thus SKB freeing can
> be done directly, instead of rescheduled to a softirq) it should be
> faster.
> 
> And I think I see what the problem is:

 .../...

So fixing that reduced the loss to 1.5%. So far I haven't managed to
coerce perf into giving me meaningful data as to what's going on tho.

Interestingly enough, my DART iommu code is pretty high in all the
profile runs, and it's ancient code that happens to contain way more
memory barriers that it needs. I ditched them and ... lost another 1.5
to 2% !

So something odd is going on, Paulus suspects the stupid direct mapped
L2 cache of those old 970 processors. But with my problems with perf I
haven't quite managed to really measure it.

In any case, I now simplified the driver even more, removing the private
lock and the mutex as well. So I'm really ready to trade those 1.5% loss
on 7 years old HW for a simpler and more maintainable driver, if you are
ok with that. It still needs testing on sparc tho.

I'll post a new spin later today after I've tested suspend/resume again.

Cheers,
Ben.