From: Adam Richter <adam_richter2004@yahoo.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, netdev@vger.kernel.org, berkley@cs.wustl.edu
Subject: Re: 2.6.29 forcedeth hang W/O NAPI enabled
Date: Wed, 25 Mar 2009 22:24:42 -0700 (PDT) [thread overview]
Message-ID: <985285.87214.qm@web57701.mail.re3.yahoo.com> (raw)
In-Reply-To: <20090326033658.GA14592@gondor.apana.org.au>
--- On Wed, 3/25/09, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Hi Adam:
>
> Any chance you can test this patch instead of the previous
> one?
OK. I tried your patch. It seems fine. I was able to do "ping -f" for five minutes with no problems, and surf the web during that time.
I preserving the rest of your message below, just to be clear about which patch I tested.
Adam
>
> net: Fix netpoll lockup in legacy receive path
>
> When I fixed the GRO crash in the legacy receive path I
> used
> napi_complete to replace __napi_complete. Unfortunately
> they're
> not the same when NETPOLL is enabled, which may result in
> us
> not calling __napi_complete at all.
>
> What's more, we really do need to keep the
> __napi_complete call
> within the IRQ-off section since in theory an IRQ can occur
> in
> between and fill up the backlog to the maximum, causing us
> to
> lock up.
>
> This patch fixes this by essentially open-coding
> __napi_complete.
>
> Note we no longer need the memory barrier because this
> function
> is per-cpu.
>
> Signed-off-by: Herbert Xu
> <herbert@gondor.apana.org.au>
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index e3fe5c7..2a7f6b3 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2588,9 +2588,10 @@ static int process_backlog(struct
> napi_struct *napi, int quota)
> local_irq_disable();
> skb = __skb_dequeue(&queue->input_pkt_queue);
> if (!skb) {
> + list_del(&napi->poll_list);
> + clear_bit(NAPI_STATE_SCHED, &napi->state);
> local_irq_enable();
> - napi_complete(napi);
> - goto out;
> + break;
> }
> local_irq_enable();
>
> @@ -2599,7 +2600,6 @@ static int process_backlog(struct
> napi_struct *napi, int quota)
>
> napi_gro_flush(napi);
>
> -out:
> return work;
> }
>
> Thanks,
> --
> Visit Openswan at http://www.openswan.org/
> Email: Herbert Xu 许志壬
> <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/�herbert/
> PGP Key: http://gondor.apana.org.au/�herbert/pubkey.txt
next prev parent reply other threads:[~2009-03-26 5:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 23:24 2.6.29 forcedeth hang W/O NAPI enabled Adam Richter
2009-03-26 0:05 ` David Miller
2009-03-26 1:20 ` Adam Richter
2009-03-26 3:14 ` David Miller
2009-03-26 3:36 ` Herbert Xu
2009-03-26 5:24 ` Adam Richter [this message]
2009-03-26 6:58 ` Herbert Xu
2009-03-26 23:29 ` Adam Richter
-- strict thread matches above, loose matches on Subject: below --
2009-03-26 0:06 Adam Richter
2009-03-26 0:08 ` David Miller
2009-03-24 15:28 Mr. Berkley Shands
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=985285.87214.qm@web57701.mail.re3.yahoo.com \
--to=adam_richter2004@yahoo.com \
--cc=berkley@cs.wustl.edu \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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 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).