]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Merge branch 'netdev_page_frags'
authorDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 14:39:27 +0000 (10:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 14:39:27 +0000 (10:39 -0400)
commit8df2914598c5300a937760daa271fdbddce1108c
tree1b67a0aa202e867b950b6ac2062df7faaa5c1d23
parentb396cca6fafccf16206a5d041d59c9e6b65b6f5a
parente51423d9959df283c5af4ff13703f87e39d6e144
Merge branch 'netdev_page_frags'

Alexander Duyck says:

====================
Refactor netdev page frags and move them into mm/

This patch series addresses several things.

First I found an issue in the performance of the pfmemalloc check from
build_skb.  To work around it I have provided a cached copy of pfmemalloc
to be used in __netdev_alloc_skb and __napi_alloc_skb.

Second I moved the page fragment allocation logic into the mm tree and
added functionality for freeing page fragments.  I had to fix igb before I
could do this as it was using a reference to NETDEV_FRAG_PAGE_MAX_SIZE
incorrectly.

Finally I went through and replaced all of the duplicate code that was
calling put_page and replaced it with calls to skb_free_frag.

With these changes in place a simple receive and drop test increased from a
packet rate of 8.9Mpps to 9.8Mpps.  The gains breakdown as follows:

8.9Mpps Before 9.8Mpps After
------------------------ ------------------------
7.8% put_compound_page 9.1% __free_page_frag
3.9% skb_free_head
1.1% put_page

4.9% build_skb 3.8% __napi_alloc_skb
2.5% __alloc_rx_skb
1.9% __napi_alloc_skb
====================

Signed-off-by: David S. Miller <davem@davemloft.net>