]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-netback: use gref mappings for Rx requests
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 12 May 2017 08:46:40 +0000 (09:46 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 31 May 2017 21:51:59 +0000 (22:51 +0100)
commit18d34eabd73a3fbe90efb551259d4def0c12a2d5
tree17063b19b089d4829e565cd6a437a38d72fbe8fc
parentaa504915879de395e60f2ca88547d95a27ed11b7
xen-netback: use gref mappings for Rx requests

First lookup in the frontend gref mapping table to see whether
the requested gref is already mapped and has the right permissions.
If so, use that instead.

Results are 2.04 Mpps measured with pktgen (pkt_size 64, burst 1)
with already mapped grants versus half of it with grant copy.
Fundamentally it works in the same way as grants, it just avoids
asking Xen to copy the page, and hence opening room for other
improvements.

For example with the mapped grefs it further adds up contention on
queue->wq as the kthread_guest_rx goes to sleep more often. We can
alternatively copy the skb on xenvif_start_xmit() instead of going
through the RX kthread. It would only be beneficial if guest would
*only* use the mapped grants (either by copying or recycling mechanisms)
otherwise it would significantly add up the added cost of a grant copy
hypercall per packet.

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/rx.c