On Fri, 2006-04-08 at 11:18 +1000, Herbert Xu wrote:
> On Thu, Aug 03, 2006 at 09:16:04PM -0400, jamal wrote:
> >
> > and in tg3_tx():
> >
> > if likely(stopped) {
> > // essentially no lock needed here ....
> > prune tx ring
> > if prunned > threshold
> > wake
> > } else if not stopped {
> > // need a lock here ...
> > grab ring tx lock irq safe
> > prune tx ring
> > release ring tx lock
> > }
>
> The problem is that the !stopped case may be the common path for a
> lot of workloads so it'd be good to avoid taking the lock there if
> we can.
True.
Although i cant think of a clever way to do the inverse....
The heuristic i was using to avoid the lock on tx at pruning time was
knowledge that tx was not being entered at all on stop.
cheers,
jamal
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html