]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-netback: use gref mappings for Tx requests
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 12 May 2017 08:46:41 +0000 (09:46 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 31 May 2017 21:52:00 +0000 (22:52 +0100)
commitfdbb2e3659b3677b4fc5af732ae1406c844b2b3f
tree5305768d454c3d95de51b30f4c6a0d68fc60a563
parent18d34eabd73a3fbe90efb551259d4def0c12a2d5
xen-netback: use gref mappings for Tx requests

Introduces grants already mapped (by control ring request of the guest)
for TX path which follows similar code path as the grant mapping.

It starts by checking if there's a grant available for header
and frags grefs and if so setting it in tx_grants. If no gref mapping
is found in the tree for the header it will resort to grant copy. For the
frags it will perform a gref lookup on the mapping table, and in case of
no entry is found it falls back to grant map/unmap using mmap_pages. When
skb destructor callback gets called we release the slot and the grant
within the callback to avoid waking up the dealloc thread. As long as there
are no unmaps to be done the dealloc thread will remain inactive.

Results show an improvement of 46% (3.6 vs 1.24 Mpps, 64 pkt size)
measured with pktgen and up to over 48% (28 vs 14.5 Gbit/s) measured
with iperf3 2 queue vif, DomU to Dom0. Measured too with sendfile()
and it goes further up to 35.3 Gbit/s given the lack of a second copy.
Tests run locally on a Intel Xeon CPU E5-2699 v3 with HT disabled,
Dom0 <-> DomU.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Orabug: 26107942
drivers/net/xen-netback/common.h
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/netback.c