24/06/2026 05:23, Chengwen Feng: > Currently lcore_conf is a global static array. When multiple > ports/lcores are distributed across different NUMA nodes, datapath > suffers from severe cross-NUMA memory access penalty. > > On Kunpeng platform, sizeof(struct lcore_conf) reaches 133760 bytes. > Such a huge per-lcore structure significantly amplifies cross-NUMA > overhead in multi-port multi-NUMA deployment scenarios. > > This commit refactors lcore_conf to pointer array and implements > per-lcore NUMA-aware hugepage allocation, allocating each lcore's > configuration on its local socket to eliminate remote memory access. > > Signed-off-by: Chengwen Feng <[email protected]>
There is an issue with this change as found by AI: init_lcore_conf() is called before parse_args(), so the new lcore_conf allocation happens before --no-numa can set numa_on = 0. As a result, init_lcore_conf() always uses rte_lcore_to_socket_id() and allocates each lcore_conf on the lcore's NUMA socket, even when the user requested non-NUMA allocation. This can also make startup fail if an enabled lcore is on a socket without hugepage memory, although --no-numa should force allocations on socket 0. init_lcore_conf() should be moved after parse_args(), and it should use something like: socketid = numa_on ? rte_lcore_to_socket_id(lcore_id) : 0;

