From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751036AbdALURK (ORCPT ); Thu, 12 Jan 2017 15:17:10 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:56470 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbdALURI (ORCPT ); Thu, 12 Jan 2017 15:17:08 -0500 Date: Thu, 12 Jan 2017 15:17:06 -0500 (EST) Message-Id: <20170112.151706.1389870722624942785.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 From: David Miller In-Reply-To: <1484176637-2869-1-git-send-email-vineethp@amazon.com> References: <1484176637-2869-1-git-send-email-vineethp@amazon.com> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 12 Jan 2017 11:18:00 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vineeth Remanan Pillai 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.