netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vineethp@amazon.com
Cc: boris.ostrovsky@oracle.com, jgross@suse.com,
	xen-devel@lists.xenproject.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kamatam@amazon.com,
	aliguori@amazon.com
Subject: Re: [PATCH] xen-netfront: Fix Rx stall during network stress and OOM
Date: Thu, 12 Jan 2017 15:17:06 -0500 (EST)	[thread overview]
Message-ID: <20170112.151706.1389870722624942785.davem@davemloft.net> (raw)
In-Reply-To: <1484176637-2869-1-git-send-email-vineethp@amazon.com>

From: Vineeth Remanan Pillai <vineethp@amazon.com>
Date: Wed, 11 Jan 2017 23:17:17 +0000

> @@ -1054,7 +1059,11 @@ static int xennet_poll(struct napi_struct *napi, int budget)
>  		napi_complete(napi);
>  
>  		RING_FINAL_CHECK_FOR_RESPONSES(&queue->rx, more_to_do);
> -		if (more_to_do)
> +
> +		/* If there is more work to do or could not allocate
> +		 * rx buffers, re-enable polling.
> +		 */
> +		if (more_to_do || err != 0)
>  			napi_schedule(napi);

Just polling endlessly in a loop retrying the SKB allocation over and over
again until it succeeds is not very nice behavior.

You already have that refill timer, so please use that to retry instead
of wasting cpu cycles looping in NAPI poll.

Thanks.

  reply	other threads:[~2017-01-12 20:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 23:17 [PATCH] xen-netfront: Fix Rx stall during network stress and OOM Vineeth Remanan Pillai
2017-01-12 20:17 ` David Miller [this message]
2017-01-12 23:09   ` Vineeth Remanan Pillai
2017-01-13 17:55     ` [PATCH v2] " Remanan Pillai
2017-01-16  6:24       ` Juergen Gross
2017-01-18 17:02         ` Vineeth Remanan Pillai
2017-01-18 20:08           ` David Miller
2017-01-18 20:10           ` David Miller
2017-01-18 20:24             ` Vineeth Remanan Pillai

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=20170112.151706.1389870722624942785.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aliguori@amazon.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=kamatam@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vineethp@amazon.com \
    --cc=xen-devel@lists.xenproject.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).