]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-netfront: introduce rx page recyling
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 12 May 2017 08:46:44 +0000 (09:46 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 31 May 2017 21:52:02 +0000 (22:52 +0100)
commit3f096bc26770cf4346a5351c7666b62977ff8193
tree1d4117f8e039792bdfa69b6f9e1a1b0c08f79c0b
parent76df6832051168def8975b2e442e8ed56d79c466
xen-netfront: introduce rx page recyling

Recycling pages lets us avoid the page allocator when possible, as
similar approach followed by ixgbe and mlx{4,5} drivers. Introduce
a small buffer pool tracking outstanding pages. We increase page
refcount by 1 to avoid stack freeing the page in upper layers. Recycling
of pages is then possible on inflight skbs, by the time we process N
requests by the stack and thus when allocating new Rx requests we
attempting at reusing the oldest page in the pool if and only if
page._refcount is 1. Otherwise we just decrement the refcount (on
free_page).

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Orabug: 26107942
drivers/net/xen-netfront.c