[RFC 0/2] introduce LLC aware functions
Mattias Rönnblom
hofors at lysator.liu.se
Tue Aug 27 23:23:04 CEST 2024
On 2024-08-27 17:10, Vipin Varghese wrote:
> As core density continues to increase, chiplet-based
> core packing has become a key trend. In AMD SoC EPYC
> architectures, core complexes within the same chiplet
> share a Last-Level Cache (LLC). By packing logical cores
> within the same LLC, we can enhance pipeline processing
> stages due to reduced latency and improved data locality.
>
> To leverage these benefits, DPDK libraries and examples
> can utilize localized lcores. This approach ensures more
> consistent latencies by minimizing the dispersion of lcores
> across different chiplet complexes and enhances packet
> processing by ensuring that data for subsequent pipeline
> stages is likely to reside within the LLC.
>
We shouldn't have a separate CPU/cache hierarchy API instead?
Could potentially be built on the 'hwloc' library.
I much agree cache/core topology may be of interest of the application
(or a work scheduler, like a DPDK event device), but it's not limited to
LLC. It may well be worthwhile to care about which cores shares L2
cache, for example. Not sure the RTE_LCORE_FOREACH_* approach scales.
> < Function: Purpose >
> ---------------------
> - rte_get_llc_first_lcores: Retrieves all the first lcores in the shared LLC.
> - rte_get_llc_lcore: Retrieves all lcores that share the LLC.
> - rte_get_llc_n_lcore: Retrieves the first n or skips the first n lcores in the shared LLC.
>
> < MACRO: Purpose >
> ------------------
> RTE_LCORE_FOREACH_LLC_FIRST: iterates through all first lcore from each LLC.
> RTE_LCORE_FOREACH_LLC_FIRST_WORKER: iterates through all first worker lcore from each LLC.
> RTE_LCORE_FOREACH_LLC_WORKER: iterates lcores from LLC based on hint (lcore id).
> RTE_LCORE_FOREACH_LLC_SKIP_FIRST_WORKER: iterates lcores from LLC while skipping first worker.
> RTE_LCORE_FOREACH_LLC_FIRST_N_WORKER: iterates through `n` lcores from each LLC.
> RTE_LCORE_FOREACH_LLC_SKIP_N_WORKER: skip first `n` lcores, then iterates through reaming lcores in each LLC.
>
> Vipin Varghese (2):
> eal: add llc aware functions
> eal/lcore: add llc aware for each macro
>
> lib/eal/common/eal_common_lcore.c | 279 ++++++++++++++++++++++++++++--
> lib/eal/include/rte_lcore.h | 89 ++++++++++
> 2 files changed, 356 insertions(+), 12 deletions(-)
>
More information about the dev
mailing list