From: Stephen Hemminger <shemminger@osdl.org>
To: "Michael Chan" <mchan@broadcom.com>
Cc: davem@davemloft.net, herbert@gondor.apana.org.au,
jgarzik@pobox.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX
Date: Mon, 5 Jun 2006 15:58:34 -0700 [thread overview]
Message-ID: <20060605155834.031d37a2@localhost.localdomain> (raw)
In-Reply-To: <1149536852.13155.7.camel@rh4>
On Mon, 05 Jun 2006 12:47:32 -0700
"Michael Chan" <mchan@broadcom.com> wrote:
> Herbert Xu pointed out that it is unsafe to call netif_tx_disable()
> from LLTX drivers because it uses dev->xmit_lock to synchronize
> whereas LLTX drivers use private locks.
>
> Convert tg3 to non-LLTX to fix this issue. tg3 is a lockless driver
> where hard_start_xmit and tx completion handling can run concurrently
> under normal conditions. A tx_lock is only needed to prevent
> netif_stop_queue and netif_wake_queue race condtions when the queue
> is full.
>
> So whether we use LLTX or non-LLTX, it makes practically no
> difference.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Since you are going more lockless, you probably need memory barriers.
I don't feel although that comfortable with the lockless driver model as is.
Perhaps there is something simpler that could be done with a ring model and
some atomic primitives like cmpxchg()?
next prev parent reply other threads:[~2006-06-05 22:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 19:47 [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX Michael Chan
2006-06-05 22:58 ` Stephen Hemminger [this message]
2006-06-05 21:29 ` Michael Chan
2006-06-06 0:31 ` Stephen Hemminger
2006-06-05 23:34 ` Michael Chan
2006-06-05 23:06 ` David Miller
2006-06-18 4:58 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060605155834.031d37a2@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.