linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH 0/6] Add skb_free_frag to replace put_page(virt_to_head_page(ptr))
@ 2015-05-04 23:14 Alexander Duyck
  2015-05-04 23:14 ` [net-next PATCH 1/6] net: Add skb_free_frag to replace use of put_page in freeing skb->head Alexander Duyck
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Alexander Duyck @ 2015-05-04 23:14 UTC (permalink / raw)
  To: linux-mm, netdev; +Cc: akpm, davem

This patch set cleans up some of the handling of page frags used in the skb
allocation.  The issue was we were having to use a number of calls to
virt_to_head_page in a number of places and then following that up with
put_page.  Both calls end up being expensive, the first due to size, and
the second due to the fact that we end up having to call a number of other
functions before we finally see the page freed in the case of compound
pages.

The skb_free_frag function is meant to resolve that by providing a
centralized location for the virt_to_head_page call and by coalesing
several checks such as the check for PageHead into a single check so that
we can keep the instruction cound minimal when freeing the page frag.

With this change I am seeing an improvement of about 5% in a simple
receive/drop test.

---

Alexander Duyck (6):
      net: Add skb_free_frag to replace use of put_page in freeing skb->head
      netcp: Replace put_page(virt_to_head_page(ptr)) w/ skb_free_frag
      mvneta: Replace put_page(virt_to_head_page(ptr)) w/ skb_free_frag
      e1000: Replace e1000_free_frag with skb_free_frag
      hisilicon: Replace put_page(virt_to_head_page()) with skb_free_frag()
      bnx2x, tg3: Replace put_page(virt_to_head_page()) with skb_free_frag()


 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    2 +-
 drivers/net/ethernet/broadcom/tg3.c             |    2 +-
 drivers/net/ethernet/hisilicon/hip04_eth.c      |    2 +-
 drivers/net/ethernet/intel/e1000/e1000_main.c   |   19 ++++++---------
 drivers/net/ethernet/marvell/mvneta.c           |    2 +-
 drivers/net/ethernet/ti/netcp_core.c            |    2 +-
 include/linux/gfp.h                             |    1 +
 include/linux/skbuff.h                          |    1 +
 mm/page_alloc.c                                 |    4 +--
 net/core/skbuff.c                               |   29 +++++++++++++++++++++--
 10 files changed, 41 insertions(+), 23 deletions(-)

--

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-05-06 20:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 23:14 [net-next PATCH 0/6] Add skb_free_frag to replace put_page(virt_to_head_page(ptr)) Alexander Duyck
2015-05-04 23:14 ` [net-next PATCH 1/6] net: Add skb_free_frag to replace use of put_page in freeing skb->head Alexander Duyck
2015-05-05  0:16   ` Eric Dumazet
2015-05-05  2:49     ` Alexander Duyck
2015-05-06 19:38   ` Andrew Morton
2015-05-06 20:27     ` Alexander Duyck
2015-05-06 20:41       ` Andrew Morton
2015-05-06 20:55         ` Alexander Duyck
2015-05-04 23:14 ` [net-next PATCH 2/6] netcp: Replace put_page(virt_to_head_page(ptr)) w/ skb_free_frag Alexander Duyck
2015-05-04 23:14 ` [net-next PATCH 3/6] mvneta: " Alexander Duyck
2015-05-04 23:15 ` [net-next PATCH 4/6] e1000: Replace e1000_free_frag with skb_free_frag Alexander Duyck
2015-05-05  0:28   ` Jeff Kirsher
2015-05-04 23:15 ` [net-next PATCH 5/6] hisilicon: Replace put_page(virt_to_head_page()) with skb_free_frag() Alexander Duyck
2015-05-04 23:15 ` [net-next PATCH 6/6] bnx2x, tg3: " Alexander Duyck
2015-05-05 23:28 ` [net-next PATCH 0/6] Add skb_free_frag to replace put_page(virt_to_head_page(ptr)) David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox