All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-nex V2 0/3] page_pool: API for numa node change handling
@ 2019-10-23 19:36 Saeed Mahameed
  2019-10-23 19:36 ` [PATCH net-nex V2 1/3] page_pool: Add API to update numa node Saeed Mahameed
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Saeed Mahameed @ 2019-10-23 19:36 UTC (permalink / raw)
  To: David S. Miller, Jesper Dangaard Brouer
  Cc: netdev, Jonathan Lemon, ilias.apalodimas, Saeed Mahameed

Hi Dave & Jesper,

This series extends page pool API to allow page pool consumers to update
page pool numa node on the fly. This is required since on some systems,
rx rings irqs can migrate between numa nodes, due to irq balancer or user
defined scripts, current page pool has no way to know of such migration
and will keep allocating and holding on to pages from a wrong numa node,
which is bad for the consumer performance.

1) Add API to update numa node id of the page pool
Consumers will call this API to update the page pool numa node id.

2) Don't recycle non-reusable pages:
Page pool will check upon page return whether a page is suitable for
recycling or not. 
 2.1) when it belongs to a different num node.
 2.2) when it was allocated under memory pressure.

3) mlx5 will use the new API to update page pool numa id on demand.

The series is a joint work between me and Jonathan, we tested it and it
proved itself worthy to avoid page allocator bottlenecks and improve
packet rate and cpu utilization significantly for the described
scenarios above.

Performance testing:
XDP drop/tx rate and TCP single/multi stream, on mlx5 driver
while migrating rx ring irq from close to far numa:

mlx5 internal page cache was locally disabled to get pure page pool
results.

CPU: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz
NIC: Mellanox Technologies MT27700 Family [ConnectX-4] (100G)

XDP Drop/TX single core:
NUMA  | XDP  | Before    | After
---------------------------------------
Close | Drop | 11   Mpps | 10.9 Mpps
Far   | Drop | 4.4  Mpps | 5.8  Mpps

Close | TX   | 6.5 Mpps  | 6.5 Mpps
Far   | TX   | 3.5 Mpps  | 4   Mpps

Improvement is about 30% drop packet rate, 15% tx packet rate for numa
far test.
No degradation for numa close tests.

TCP single/multi cpu/stream:
NUMA  | #cpu | Before  | After
--------------------------------------
Close | 1    | 18 Gbps | 18 Gbps
Far   | 1    | 15 Gbps | 18 Gbps
Close | 12   | 80 Gbps | 80 Gbps
Far   | 12   | 68 Gbps | 80 Gbps

In all test cases we see improvement for the far numa case, and no
impact on the close numa case.

v1->v2:
  - Drop last patch, as requested by Ilias and Jesper.
  - Fix documentation's performance numbers order.

Thanks,
Saeed.

---

Saeed Mahameed (3):
  page_pool: Add API to update numa node
  page_pool: Don't recycle non-reusable pages
  net/mlx5e: Rx, Update page pool numa node when changed

 .../net/ethernet/mellanox/mlx5/core/en_rx.c   |  3 +++
 include/net/page_pool.h                       |  7 ++++++
 include/trace/events/page_pool.h              | 22 +++++++++++++++++++
 net/core/page_pool.c                          | 22 ++++++++++++++++++-
 4 files changed, 53 insertions(+), 1 deletion(-)

-- 
2.21.0


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

end of thread, other threads:[~2019-10-28 22:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 19:36 [PATCH net-nex V2 0/3] page_pool: API for numa node change handling Saeed Mahameed
2019-10-23 19:36 ` [PATCH net-nex V2 1/3] page_pool: Add API to update numa node Saeed Mahameed
2019-10-24  4:50   ` Ilias Apalodimas
2019-10-23 19:37 ` [PATCH net-nex V2 2/3] page_pool: Don't recycle non-reusable pages Saeed Mahameed
2019-10-24  5:00   ` Ilias Apalodimas
2019-10-25 13:33   ` Jesper Dangaard Brouer
2019-10-25 18:37     ` Jonathan Lemon
2019-10-28 22:57     ` Saeed Mahameed
2019-10-23 19:37 ` [PATCH net-nex V2 3/3] net/mlx5e: Rx, Update page pool numa node when changed Saeed Mahameed
2019-10-28 18:31 ` [PATCH net-nex V2 0/3] page_pool: API for numa node change handling David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.