linux/drivers/net
Brenden Blanco d576acf0a2 net/mlx4_en: add page recycle to prepare rx ring for tx support
The mlx4 driver by default allocates order-3 pages for the ring to
consume in multiple fragments. When the device has an xdp program, this
behavior will prevent tx actions since the page must be re-mapped in
TODEVICE mode, which cannot be done if the page is still shared.

Start by making the allocator configurable based on whether xdp is
running, such that order-0 pages are always used and never shared.

Since this will stress the page allocator, add a simple page cache to
each rx ring. Pages in the cache are left dma-mapped, and in drop-only
stress tests the page allocator is eliminated from the perf report.

Note that setting an xdp program will now require the rings to be
reconfigured.

Before:
 26.91%  ksoftirqd/0  [mlx4_en]         [k] mlx4_en_process_rx_cq
 17.88%  ksoftirqd/0  [mlx4_en]         [k] mlx4_en_alloc_frags
  6.00%  ksoftirqd/0  [mlx4_en]         [k] mlx4_en_free_frag
  4.49%  ksoftirqd/0  [kernel.vmlinux]  [k] get_page_from_freelist
  3.21%  swapper      [kernel.vmlinux]  [k] intel_idle
  2.73%  ksoftirqd/0  [kernel.vmlinux]  [k] bpf_map_lookup_elem
  2.57%  swapper      [mlx4_en]         [k] mlx4_en_process_rx_cq

After:
 31.72%  swapper      [kernel.vmlinux]       [k] intel_idle
  8.79%  swapper      [mlx4_en]              [k] mlx4_en_process_rx_cq
  7.54%  swapper      [kernel.vmlinux]       [k] poll_idle
  6.36%  swapper      [mlx4_core]            [k] mlx4_eq_int
  4.21%  swapper      [kernel.vmlinux]       [k] tasklet_action
  4.03%  swapper      [kernel.vmlinux]       [k] cpuidle_enter_state
  3.43%  swapper      [mlx4_en]              [k] mlx4_en_prepare_rx_desc
  2.18%  swapper      [kernel.vmlinux]       [k] native_irq_return_iret
  1.37%  swapper      [kernel.vmlinux]       [k] menu_select
  1.09%  swapper      [kernel.vmlinux]       [k] bpf_map_lookup_elem

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-19 21:46:32 -07:00
..
appletalk treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-07-06 10:35:22 -07:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-06-30 05:03:36 -04:00
cris treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
dsa net: dsa: mv88e6xxx: add support for DSA ageing time 2016-07-19 19:42:02 -07:00
ethernet net/mlx4_en: add page recycle to prepare rx ring for tx support 2016-07-19 21:46:32 -07:00
fddi net: skfb: remove obsolete -I cflag 2016-06-15 22:06:06 -07:00
fjes net: fjes: fjes_main: Remove create_workqueue 2016-06-03 19:29:42 -04:00
hamradio hamradio: baycom: fix old-style declaration 2016-06-16 22:06:30 -07:00
hippi
hyperv netvsc: Use the new in-place consumption APIs in the rx path 2016-07-08 23:11:20 -04:00
ieee802154 mrf24j40: avoid uninitialized byte in SPI transfer to radio. 2016-07-12 11:54:53 +02:00
ipvlan net: ipvlan: call netdev_lockdep_set_classes() 2016-06-09 13:28:37 -07:00
irda net: irda: avoid null pointer dereference 2016-05-19 11:30:57 -07:00
phy Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links. 2016-07-19 16:05:56 -07:00
plip
ppp net: add netdev_lockdep_set_classes() helper 2016-06-09 13:28:37 -07:00
slip treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
team net: introduce default neigh_construct/destroy ndo calls for L2 upper devices 2016-07-05 09:06:28 -07:00
usb net: usb: ax88172x: use phy_ethtool_{get|set}_link_ksettings 2016-07-16 21:54:40 -07:00
vmxnet3 vmxnet3: update to version 3 2016-06-16 22:37:05 -07:00
wan wan/fsl_ucc_hdlc: rewrite error handling to make it clearer 2016-07-16 20:22:02 -07:00
wimax treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
wireless wireless-drivers-next patches for 4.8 2016-07-14 16:32:27 -07:00
xen-netback xen-netback: only deinitialized hash if it was initialized 2016-05-20 17:41:18 -04:00
dummy.c
eql.c
geneve.c drivers/net: fixup comments after "Future-proof tunnel offload handlers" 2016-07-11 13:42:11 -07:00
gtp.c gtp: remove unused including <linux/version.h> 2016-06-17 22:28:49 -07:00
ifb.c ifb: support more features 2016-05-09 00:00:28 -04:00
Kconfig gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) 2016-05-10 12:25:04 -04:00
LICENSE.SRC
loopback.c loopback: make use of NETIF_F_GSO_SOFTWARE 2016-06-03 19:37:21 -04:00
macsec.c macsec: set actual real device for xmit when !protect_frames 2016-07-01 16:35:56 -04:00
macvlan.c net: macvlan: call netdev_lockdep_set_classes() 2016-06-09 13:28:37 -07:00
macvtap.c macvtap: correctly free skb during socket destruction 2016-07-18 22:11:22 -07:00
Makefile gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) 2016-05-10 12:25:04 -04:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c net: Fix coding style warnings and errors. 2016-05-19 11:48:27 -07:00
sungem_phy.c
tun.c tun: Don't assume type tun in tun_device_event 2016-07-08 23:58:57 -04:00
veth.c
virtio_net.c virtio-net: Remove more stack DMA 2016-07-19 19:25:43 -07:00
vrf.c net: vrf: Add support for PREROUTING rules on vrf device 2016-07-05 11:50:05 -07:00
vxlan.c drivers/net: fixup comments after "Future-proof tunnel offload handlers" 2016-07-11 13:42:11 -07:00
xen-netfront.c