]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: stop vif thread spinning if frontend is unresponsive
authorPaul Durrant <Paul.Durrant@citrix.com>
Wed, 8 Jan 2014 12:41:58 +0000 (12:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jan 2014 04:05:46 +0000 (23:05 -0500)
commit599c1018e86226ed3bd9014f8217c772e2d3b3ff
tree6da4cdb6bbaf71ab38ad9a133e2391aa4910f32a
parent6b43f26d0013c99d6f4fdfad5d316ef1c5abedc0
xen-netback: stop vif thread spinning if frontend is unresponsive

The recent patch to improve guest receive side flow control (8f1a187a) 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 <paul.durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/common.h
drivers/net/xen-netback/netback.c