netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Matt Mackall <mpm@selenic.com>
Cc: jmoyer@redhat.com, netdev@oss.sgi.com
Subject: Re: serious netpoll bug w/NAPI
Date: Wed, 9 Feb 2005 16:46:58 -0800	[thread overview]
Message-ID: <20050209164658.409f8950.davem@davemloft.net> (raw)
In-Reply-To: <20050209183219.GA2366@waste.org>

On Wed, 9 Feb 2005 10:32:19 -0800
Matt Mackall <mpm@selenic.com> wrote:

> On closer inspection, there's a couple other related failure cases
> with the new ->poll logic in netpoll. I'm afraid it looks like
> CONFIG_NETPOLL will need to guard ->poll() with a per-device spinlock
> on netpoll-enabled devices.
> 
> This will mean putting a pointer to struct netpoll in struct
> net_device (which I should have done in the first place) and will take
> a few patches to sort out.

Will this ->poll() guarding lock be acquired only in the netpoll
code or system-wide?  If the latter, this introduced an incredible
performance regression for devices using the LLTX locking scheme
(ie. the most important high-performance gigabit drivers in the
tree use this).

Please detail your fix idea so that I can analyze a concrete idea
instead of some guess on my part :-)

I know you want to do anything except drop the packet.  What you
may do instead, therefore, is add the packet to the normal device
mid-layer queue and kick NET_TX_ACTION if netif_queue_stopped() is
true.

Sure, the packet still might get dropped in extreme cases, but
this idea seems to eliminate all of this locking complexity netpoll
is trying to handle.

As an aside, ipt_LOG is a great stress test for netpoll, because 4
incoming packets can generate 8 outgoing packets worth of netconsole
traffic :-)

  reply	other threads:[~2005-02-10  0:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-09  4:16 serious netpoll bug w/NAPI David S. Miller
2005-02-09 18:32 ` Matt Mackall
2005-02-10  0:46   ` David S. Miller [this message]
2005-02-10  1:11     ` Matt Mackall
2005-02-10  9:16       ` Martin Josefsson
2005-02-10 17:14         ` Matt Mackall
2005-02-15 22:49       ` Jeff Moyer
2005-02-16  5:07         ` Matt Mackall
2005-02-16 19:26           ` Jeff Moyer
2005-02-16 22:07           ` Jeff Moyer
2005-02-16 23:02           ` David S. Miller
2005-02-16 23:44             ` Matt Mackall
2005-02-16 23:54               ` David S. Miller
2005-02-17  0:15                 ` Matt Mackall

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=20050209164658.409f8950.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jmoyer@redhat.com \
    --cc=mpm@selenic.com \
    --cc=netdev@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).