RE: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-11 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > Sent: Wednesday, 11 September 2024 17.05 > > On 2024-09-11 12:32, Morten Brørup wrote: > >> +static void *lcore_buffer; > > [...] > >> + lcore_buffer = aligned_alloc(RTE_CACHE_LINE_SIZE, > >> +

Re: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-11 Thread Mattias Rönnblom
On 2024-09-11 12:32, Morten Brørup wrote: +static void *lcore_buffer; [...] + lcore_buffer = aligned_alloc(RTE_CACHE_LINE_SIZE, +LCORE_BUFFER_SIZE); Since lcore_buffer is never freed again, it is easy to support Windows: #ifdef RTE_EX

RE: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-11 Thread Morten Brørup
> +static void *lcore_buffer; [...] > + lcore_buffer = aligned_alloc(RTE_CACHE_LINE_SIZE, > + LCORE_BUFFER_SIZE); Since lcore_buffer is never freed again, it is easy to support Windows: #ifdef RTE_EXEC_ENV_WINDOWS #include #endif #ifndef RTE_

Re: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-10 Thread Stephen Hemminger
On Tue, 10 Sep 2024 12:44:49 +0200 Mattias Rönnblom wrote: > "lcore" is just another word for "EAL thread." The lcore variables exist > in one instance for every thread with an lcore id, thus also for > registered non-EAL threads (i.e., threads which are not lcores). > > I've tried to summariz

RE: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-10 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:hof...@lysator.liu.se] > Sent: Tuesday, 10 September 2024 12.45 > > On 2024-09-10 11:32, Morten Brørup wrote: > >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > >> Sent: Tuesday, 10 September 2024 09.04 > >> > >> Introduce DPDK per-lcore id variab

Re: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-10 Thread Mattias Rönnblom
On 2024-09-10 11:32, Morten Brørup wrote: From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] Sent: Tuesday, 10 September 2024 09.04 Introduce DPDK per-lcore id variables, or lcore variables for short. Throughout the descriptions and comments, please replace "lcore id" with "lcore" (

RE: [PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-10 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Tuesday, 10 September 2024 09.04 > > Introduce DPDK per-lcore id variables, or lcore variables for short. Throughout the descriptions and comments, please replace "lcore id" with "lcore" (e.g. "per-lcore variables"), when ref

[PATCH 1/6] eal: add static per-lcore memory allocation facility

2024-09-10 Thread Mattias Rönnblom
Introduce DPDK per-lcore id variables, or lcore variables for short. An lcore variable has one value for every current and future lcore id-equipped thread. The primary use case is for statically allocating small, frequently-accessed data structures, for which one instance should exist for each l