netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH 0/7] net: bulk alloc side and more bulk free drivers
@ 2016-03-04 13:01 Jesper Dangaard Brouer
  2016-03-04 13:01 ` [net-next PATCH 1/7] mlx5: use napi_consume_skb API to get bulk free operations Jesper Dangaard Brouer
                   ` (7 more replies)
  0 siblings, 8 replies; 36+ messages in thread
From: Jesper Dangaard Brouer @ 2016-03-04 13:01 UTC (permalink / raw)
  To: netdev, David S. Miller
  Cc: eugenia, Alexander Duyck, alexei.starovoitov, saeedm,
	Jesper Dangaard Brouer, gerlitz.or

This patchset use the bulk ALLOC side of the kmem_cache bulk APIs, for
SKB allocations.  The bulk free side got enabled in merge commit
3134b9f019f2 ("net: mitigating kmem_cache free slowpath").

The first two patches is a followup on the free-side, which enables
bulk-free in the drivers mlx4 and mlx5 (dev_kfree_skb -> napi_consume_skb).

Rest of patchset is focused on bulk alloc-side.  We start with a
conservative bulk alloc of 8 SKB, which all drivers using the
napi_alloc_skb() call will benefit from.  Then the API is extended to,
allow driver hinting on needed SKBs (only some drivers know this
size), and mlx5 driver is the first user of hinting.

Small hint for people wanting to tune their systems. Default number of
SKB objects per slab-page is 32 objects.  This limits the bulking
sizes for the SLUB allocator.  SLUB can be tuned via kernel cmdline
boot option slub_min_objects=128.  Increasing this gives a significant
performance boost, but at the cost of more memory "waste" inside
kmem_cache/slab allocator.

Patchset based on net-next at commit 3ebeac1d0295

---

Jesper Dangaard Brouer (7):
      mlx5: use napi_consume_skb API to get bulk free operations
      mlx4: use napi_consume_skb API to get bulk free operations
      net: bulk alloc and reuse of SKBs in NAPI context
      mlx5: use napi_alloc_skb API to get SKB bulk allocations
      mlx4: use napi_alloc_skb API to get SKB bulk allocations
      net: introduce napi_alloc_skb_hint() for more use-cases
      mlx5: hint the NAPI alloc skb API about the expected bulk size


 drivers/net/ethernet/mellanox/mlx4/en_rx.c        |    7 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c        |   19 ++++-
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |    5 +
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c   |   11 ++-
 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c   |    4 +
 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c |    4 +
 include/linux/skbuff.h                            |   19 ++++-
 net/core/skbuff.c                                 |   75 +++++++++++++--------
 8 files changed, 92 insertions(+), 52 deletions(-)

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

end of thread, other threads:[~2016-03-14  6:55 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04 13:01 [net-next PATCH 0/7] net: bulk alloc side and more bulk free drivers Jesper Dangaard Brouer
2016-03-04 13:01 ` [net-next PATCH 1/7] mlx5: use napi_consume_skb API to get bulk free operations Jesper Dangaard Brouer
2016-03-04 13:01 ` [net-next PATCH 2/7] mlx4: " Jesper Dangaard Brouer
2016-03-08 19:24   ` David Miller
2016-03-09 11:00     ` Jesper Dangaard Brouer
2016-03-09 16:47       ` Alexander Duyck
2016-03-09 21:03         ` David Miller
2016-03-09 21:36           ` Jesper Dangaard Brouer
2016-03-09 21:43             ` Alexander Duyck
2016-03-09 21:47               ` Jesper Dangaard Brouer
2016-03-09 22:07                 ` Alexander Duyck
2016-03-10 12:15                   ` [net-next PATCH V2 0/3] net: bulk free adjustment and two driver use-cases Jesper Dangaard Brouer
2016-03-10 12:15                     ` [net-next PATCH V2 1/3] net: adjust napi_consume_skb to handle none-NAPI callers Jesper Dangaard Brouer
2016-03-10 12:15                     ` [net-next PATCH V2 2/3] mlx4: use napi_consume_skb API to get bulk free operations Jesper Dangaard Brouer
2016-03-10 13:59                       ` Sergei Shtylyov
2016-03-10 14:59                         ` [net-next PATCH V3 0/3] net: bulk free adjustment and two driver use-cases Jesper Dangaard Brouer
2016-03-10 14:59                           ` [net-next PATCH V3 1/3] net: adjust napi_consume_skb to handle none-NAPI callers Jesper Dangaard Brouer
2016-03-10 17:21                             ` Sergei Shtylyov
2016-03-11  7:45                               ` Jesper Dangaard Brouer
2016-03-11  8:43                                 ` [net-next PATCH V4 0/3] net: bulk free adjustment and two driver use-cases Jesper Dangaard Brouer
2016-03-11  8:43                                   ` [net-next PATCH V4 1/3] net: adjust napi_consume_skb to handle non-NAPI callers Jesper Dangaard Brouer
2016-03-11  8:44                                   ` [net-next PATCH V4 2/3] mlx4: use napi_consume_skb API to get bulk free operations Jesper Dangaard Brouer
2016-03-11  8:44                                   ` [net-next PATCH V4 3/3] mlx5: " Jesper Dangaard Brouer
2016-03-14  2:35                                   ` [net-next PATCH V4 0/3] net: bulk free adjustment and two driver use-cases David Miller
2016-03-10 14:59                           ` [net-next PATCH V3 2/3] mlx4: use napi_consume_skb API to get bulk free operations Jesper Dangaard Brouer
2016-03-10 14:59                           ` [net-next PATCH V3 3/3] mlx5: " Jesper Dangaard Brouer
2016-03-10 12:15                     ` [net-next PATCH V2 " Jesper Dangaard Brouer
2016-03-04 13:01 ` [net-next PATCH 3/7] net: bulk alloc and reuse of SKBs in NAPI context Jesper Dangaard Brouer
2016-03-13 14:06   ` Rana Shahout
2016-03-14  6:55     ` Jesper Dangaard Brouer
2016-03-04 13:01 ` [net-next PATCH 4/7] mlx5: use napi_alloc_skb API to get SKB bulk allocations Jesper Dangaard Brouer
2016-03-04 13:02 ` [net-next PATCH 5/7] mlx4: " Jesper Dangaard Brouer
2016-03-04 13:02 ` [net-next PATCH 6/7] net: introduce napi_alloc_skb_hint() for more use-cases Jesper Dangaard Brouer
2016-03-04 13:02 ` [net-next PATCH 7/7] mlx5: hint the NAPI alloc skb API about the expected bulk size Jesper Dangaard Brouer
2016-03-04 16:36 ` [net-next PATCH 0/7] net: bulk alloc side and more bulk free drivers Alexei Starovoitov
2016-03-04 19:15   ` Jesper Dangaard Brouer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).