ionic: putting ionic on a diet
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 14 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | ionic: remove desc, sg_desc and cmb_desc from desc_infodrivers/ drivers/ drivers/ +1 more | +45 | 0 replies | Applied |
| 2/14 | ionic: drop q mappingdrivers/ drivers/ drivers/ | +10 | 0 replies | Applied |
| 3/14 | ionic: move adminq-notifyq handling to main filedrivers/ drivers/ drivers/ | +67 | 0 replies | Applied |
| 4/14 | ionic: remove callback pointer from desc_infodrivers/ drivers/ drivers/ +2 more | +57 | 0 replies | Applied |
| 5/14 | ionic: remove the cq_info to save more memorydrivers/ drivers/ drivers/ +4 more | +38 | 0 replies | Applied |
| 6/14 | ionic: use specialized desc info structsdrivers/ drivers/ drivers/ +2 more | +111 | 0 replies | Applied |
| 7/14 | ionic: fold adminq clean into service routinedrivers/ | +11 | 0 replies | Applied |
| 8/14 | ionic: refactor skb buildingdrivers/ | +65 | 0 replies | Applied |
| 9/14 | ionic: carry idev in ionic_cq structdrivers/ drivers/ drivers/ | +6 | 0 replies | Applied |
| 10/14 | ionic: rearrange ionic_qcqdrivers/ | +4 | 0 replies | Applied |
| 11/14 | ionic: rearrange ionic_queue for better layoutdrivers/ | +2 | 0 replies | Applied |
| 12/14 | ionic: remove unnecessary NULL testdrivers/ | +0 | 0 replies | Applied |
| 13/14 | ionic: better dma-map error handlingdrivers/ | +14 | 0 replies | Applied |
| 14/14 | ionic: keep stats struct local to error handlingdrivers/ | +8 | 0 replies | Applied |
Reviews trailers per patch
All 14 patches have a Reviewed-by or Acked-by.
| Patch | Brett Creeley |
|---|---|
| 1/14 | R-b |
| 2/14 | R-b |
| 3/14 | R-b |
| 4/14 | R-b |
| 5/14 | R-b |
| 6/14 | R-b |
| 7/14 | R-b |
| 8/14 | R-b |
| 9/14 | R-b |
| 10/14 | R-b |
| 11/14 | R-b |
| 12/14 | R-b |
| 13/14 | R-b |
| 14/14 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 00/14] ionic: putting ionic on a diet
Building on the performance work done in the previous patchset
[Link] https://lore.kernel.org/netdev/[email protected]/
this patchset puts the ionic driver on a diet, decreasing the memory requirements per queue, and simplifies a few more bits of logic.
We trimmed the queue management structs and gained some ground, but the most savings came from trimming the individual buffer descriptors. The original design used a single generic buffer descriptor for Tx, Rx and Adminq needs, but the Rx and Adminq descriptors really don't need all the info that the Tx descriptors track. By splitting up the descriptor types we can significantly reduce the descriptor sizes for Rx and Adminq use.
There is a small reduction in the queue management structs, saving about 3 cachelines per queuepair:
ionic_qcq: Before: /* size: 2176, cachelines: 34, members: 23 */ After: /* size: 2048, cachelines: 32, members: 23 */
We also remove an array of completion descriptor pointers, or about 8 Kbytes per queue.
But the biggest savings came from splitting the desc_info struct into queue specific structs and trimming out what was unnecessary.
Before:
ionic_desc_info:
/* size: 496, cachelines: 8, members: 10 */
After:
ionic_tx_desc_info:
/* size: 496, cachelines: 8, members: 6 */
ionic_rx_desc_info:
/* size: 224, cachelines: 4, members: 2 */
ionic_admin_desc_info:
/* size: 8, cachelines: 1, members: 1 */In a 64 core host the ionic driver will default to 64 queuepairs of 1024 descriptors for Rx, 1024 for Tx, and 80 for Adminq and Notifyq.
The total memory usage for 64 queues:
Before:
65 * sizeof(ionic_qcq) 141,440
+ 64 * 1024 * sizeof(ionic_desc_info) 32,505,856
+ 64 * 1024 * sizeof(ionic_desc_info) 32,505,856
+ 64 * 1024 * 2 * sizeof(ionic_qc_info) 16,384
+ 1 * 80 * sizeof(ionic_desc_info) 39,690
----------
65,201,038
After:
65 * sizeof(ionic_qcq) 133,120
+ 64 * 1024 * sizeof(ionic_tx_desc_info) 32,505,856
+ 64 * 1024 * sizeof(ionic_rx_desc_info) 14,680,064
+ (removed) 0
+ 1 * 80 * sizeof(ionic_admin desc_info) 640
----------
47,319,680
This saves us approximately 18 Mbytes per port in a 64 core machine, a 28% savings in our memory needs.
In addition, this improves our simple single thread / single queue iperf case on a 9100 MTU connection from 86.7 to 95 Gbits/sec.
Shannon Nelson (14):
ionic: remove desc, sg_desc and cmb_desc from desc_info
ionic: drop q mapping
ionic: move adminq-notifyq handling to main file
ionic: remove callback pointer from desc_info
ionic: remove the cq_info to save more memory
ionic: use specialized desc info structs
ionic: fold adminq clean into service routine
ionic: refactor skb building
ionic: carry idev in ionic_cq struct
ionic: rearrange ionic_qcq
ionic: rearrange ionic_queue for better layout
ionic: remove unnecessary NULL test
ionic: better dma-map error handling
ionic: keep stats struct local to error handling
drivers/net/ethernet/pensando/ionic/ionic.h | 2 + .../net/ethernet/pensando/ionic/ionic_dev.c | 105 +---- .../net/ethernet/pensando/ionic/ionic_dev.h | 79 ++-- .../net/ethernet/pensando/ionic/ionic_lif.c | 165 +++----- .../net/ethernet/pensando/ionic/ionic_lif.h | 8 +- .../net/ethernet/pensando/ionic/ionic_main.c | 115 ++++- .../net/ethernet/pensando/ionic/ionic_txrx.c | 399 ++++++++---------- .../net/ethernet/pensando/ionic/ionic_txrx.h | 2 +- 8 files changed, 371 insertions(+), 504 deletions(-)
Signature · 1 line
2.17.1