Thread (9 messages) flat view 9 messages, 4 authors, 2017-01-18

Re: [PATCH] xen-netfront: Fix Rx stall during network stress and OOM

From: David Miller <davem@davemloft.net>
Date: 2017-01-12 20:17:10
Also in: lkml

From: Vineeth Remanan Pillai <redacted>
Date: Wed, 11 Jan 2017 23:17:17 +0000
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help