From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH net-next v2] xen-netback: stop vif thread spinning if frontend is unresponsive Date: Wed, 8 Jan 2014 19:37:16 +0000 Message-ID: <20140108193716.GA16009@zion.uk.xensource.com> References: <1389184918-42790-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , Wei Liu , Ian Campbell , David Vrabel To: Paul Durrant Return-path: Received: from smtp02.citrix.com ([66.165.176.63]:27844 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861AbaAHThS (ORCPT ); Wed, 8 Jan 2014 14:37:18 -0500 Content-Disposition: inline In-Reply-To: <1389184918-42790-1-git-send-email-paul.durrant@citrix.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Jan 08, 2014 at 12:41:58PM +0000, Paul Durrant wrote: > The recent patch to improve guest receive side flow control (ca2f09f2) had a > slight flaw in the wait condition for the vif thread in that any remaining > skbs in the guest receive side netback internal queue would prevent the > thread from sleeping. An unresponsive frontend can lead to a permanently > non-empty internal queue and thus the thread will spin. In this case the > thread should really sleep until the frontend becomes responsive again. > > This patch adds an extra flag to the vif which is set if the shared ring > is full and cleared when skbs are drained into the shared ring. Thus, > if the thread runs, finds the shared ring full and can make no progress the > flag remains set. If the flag remains set then the thread will sleep, > regardless of a non-empty queue, until the next event from the frontend. > > Signed-off-by: Paul Durrant > Cc: Wei Liu > Cc: Ian Campbell > Cc: David Vrabel Acked-by: Wei Liu Thanks Wei.