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>
This commit is contained in:

committed by
David S. Miller

parent
093507885a
commit
e9275f5e2d
@@ -408,6 +408,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
|
||||
.desc = i };
|
||||
vif->grant_tx_handle[i] = NETBACK_INVALID_HANDLE;
|
||||
}
|
||||
init_timer(&vif->dealloc_delay);
|
||||
|
||||
/*
|
||||
* Initialise a dummy MAC address. We choose the numerically
|
||||
@@ -556,6 +557,7 @@ void xenvif_disconnect(struct xenvif *vif)
|
||||
}
|
||||
|
||||
if (vif->dealloc_task) {
|
||||
del_timer_sync(&vif->dealloc_delay);
|
||||
kthread_stop(vif->dealloc_task);
|
||||
vif->dealloc_task = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user