On Wed, May 31, 2006 at 08:36:12AM -0400, jamal wrote:
>
> > The IRQ handler would look like
> > 
> >     if (!spin_trylock(&dev->xmit_lock)) {
> >             tasklet_schedule(&priv->tx_completion_tasklet);
> >             return;
> >     }
> > 
> >     handle_tx_completion();
> >     spin_unlock(&dev->xmit_lock);
> > 
> > Where the TX completion tasklet would simply do
> > 
> >     spin_lock(&dev->xmit_lock);
> >     handle_tx_completion();
> >     spin_unlock(&dev->xmit_lock);
> > 
> > What do you think?
> 
> Been done in the past, bad numbers especially in SMP for reasons of
> latency and likelihood that a tasklet will run in a totally different
> CPU.

Was the bad latency measured with code like the above or was it with
an unconditional tasklet schedule?

Please note that my code will do the completion in the IRQ handler
most of the time.  Only if there is contention for the spin lock will
it defer work to the softirq.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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

Reply via email to