From: "Michael Chan" <mchan@broadcom.com>
To: "David Miller" <davem@davemloft.net>
Cc: "netdev" <netdev@vger.kernel.org>,
shemminger@linux-foundation.org, jgarzik@pobox.com,
hadi@cyberus.ca, rusty@rustcorp.com.au
Subject: Re: [PATCH RFC]: napi_struct V4
Date: Thu, 26 Jul 2007 14:38:09 -0700 [thread overview]
Message-ID: <1185485889.7922.83.camel@dell> (raw)
In-Reply-To: <20070726.001516.48528000.davem@davemloft.net>
On Thu, 2007-07-26 at 00:15 -0700, David Miller wrote:
> The netpoll code has to take that anyways in order to call
> into ->hard_start_xmit() to send out the packet it has
> pending, I'm leveraging that as a synchronization mechanism
> in the drivers because the locking options are limited
> given that netpoll can try to do this in any context whatsoever.
>
> > There is a measurable difference in oprofile. When passing small
> > packets, there's a non-trivial difference in throughput.
>
> Then please help come up with an alternate scheme, because these
> NAPI changes fix real limitations and bugs in the current code
> and unless we fix netpoll too we can't move forward.
>
I'm not very familiar with netpoll, but I am guessing that we need to
prevent concurrent calls to the TX cleanup code. For maximum
flexibility, we should let ->poll_controller() handle the locking as the
driver knows what kind of locking is best.
If the driver wants a simple solution, it can do what you did in the
patch: wrap the tx cleanup code with netif_tx_lock() and
netif_tx_unlock().
If a NAPI driver wants to be more clever, it can do something such as
this in tg3's poll_controller:
if (netif_rx_schedule_prep(dev, &tp->napi)) {
tg3_tx(tp);
netif_poll_enable(tp->napi);
}
next prev parent reply other threads:[~2007-07-26 20:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 8:31 [PATCH RFC]: napi_struct V4 David Miller
2007-07-25 8:56 ` Stephen Hemminger
2007-07-26 0:37 ` David Miller
2007-07-26 1:55 ` Jeff Garzik
2007-07-26 1:56 ` David Miller
2007-07-26 2:00 ` Jeff Garzik
2007-07-26 2:02 ` David Miller
2007-07-28 18:08 ` Jeff Garzik
2007-07-29 5:33 ` David Miller
2007-07-25 12:01 ` jamal
2007-07-26 4:09 ` David Miller
2007-07-26 6:33 ` Michael Chan
2007-07-26 6:38 ` David Miller
2007-07-26 7:05 ` Michael Chan
2007-07-26 7:15 ` David Miller
2007-07-26 21:38 ` Michael Chan [this message]
2007-07-31 0:25 ` David Miller
2007-07-26 6:39 ` Michael Chan
2007-07-26 6:43 ` David Miller
2007-07-28 15:27 ` Roland Dreier
2007-07-29 5:32 ` David Miller
2007-07-30 15:04 ` Roland Dreier
2007-07-30 22:48 ` David Miller
2007-07-31 2:01 ` Roland Dreier
2007-07-31 2:03 ` 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=1185485889.7922.83.camel@dell \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=shemminger@linux-foundation.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.