aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/common.h
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@citrix.com>2014-03-06 21:48:31 +0000
committerDavid S. Miller <davem@davemloft.net>2014-03-07 15:57:21 -0500
commite9275f5e2df1b2098a8cc405d87b88b9affd73e6 (patch)
tree05898b0d8dab616b2936783964cae4f77b06af84 /drivers/net/xen-netback/common.h
parentxen-netback: Timeout packets in RX path (diff)
downloadlinux-dev-e9275f5e2df1b2098a8cc405d87b88b9affd73e6.tar.xz
linux-dev-e9275f5e2df1b2098a8cc405d87b88b9affd73e6.zip
xen-netback: Aggregate TX unmap operations
Unmapping causes TLB flushing, therefore we should make it in the largest possible batches. However we shouldn't starve the guest for too long. So if the guest has space for at least two big packets and we don't have at least a quarter ring to unmap, delay it for at most 1 milisec. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/common.h')
-rw-r--r--drivers/net/xen-netback/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index 0355f8767e3b..bef37be402b8 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -137,6 +137,8 @@ struct xenvif {
u16 dealloc_ring[MAX_PENDING_REQS];
struct task_struct *dealloc_task;
wait_queue_head_t dealloc_wq;
+ struct timer_list dealloc_delay;
+ bool dealloc_delay_timed_out;
/* Use kthread for guest RX */
struct task_struct *task;