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

2024-10-16 Thread Thomas Monjalon
14/10/2024 17:19, Stephen Hemminger: > On Mon, 14 Oct 2024 08:51:09 +0200 > Mattias Rönnblom wrote: > > > On 2024-10-11 10:04, Mattias Rönnblom wrote: > > > On 2024-10-10 23:24, Thomas Monjalon wrote: > > > > > > > > >>> + * > > >>> + * An lcore variable is not tied to the owning thread's li

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

2024-10-14 Thread Stephen Hemminger
On Mon, 14 Oct 2024 08:51:09 +0200 Mattias Rönnblom wrote: > On 2024-10-11 10:04, Mattias Rönnblom wrote: > > On 2024-10-10 23:24, Thomas Monjalon wrote: > > > > >>> + * > >>> + * An lcore variable is not tied to the owning thread's lifetime. It's > >>> + * available for use by any thread im

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

2024-10-13 Thread Mattias Rönnblom
On 2024-10-11 10:04, Mattias Rönnblom wrote: On 2024-10-10 23:24, Thomas Monjalon wrote: + * + * An lcore variable is not tied to the owning thread's lifetime. It's + * available for use by any thread immediately after having been + * allocated, and continues to be available throughout the l

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

2024-10-11 Thread Thomas Monjalon
11/10/2024 10:04, Mattias Rönnblom: > On 2024-10-10 23:24, Thomas Monjalon wrote: > > Hello, > > > > This new feature looks to bring something interesting to DPDK. > > There was a good amount of discussion and review, > > and there is a real effort of documentation. > > > > However, some choices

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

2024-10-11 Thread Morten Brørup
> >> +/** > >> + * Get pointer to lcore variable instance of the current thread. > >> + * > >> + * May only be used by EAL threads and registered non-EAL threads. > >> + */ > >> +#define RTE_LCORE_VAR_VALUE(handle) \ > > > > RTE_LCORE_VAR_LOCAL? > > > > Why is that better? > > Maybe Morten can re

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

2024-10-11 Thread Thomas Monjalon
11/10/2024 10:09, Morten Brørup: > > > +static void * > > > +lcore_var_alloc(size_t size, size_t align) > > > +{ > > > + void *handle; > > > + unsigned int lcore_id; > > > + void *value; > > > + > > > + offset = RTE_ALIGN_CEIL(offset, align); > > > + > > > + if (offset + size > RTE_MAX_LCORE_VAR) {

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

2024-10-11 Thread Morten Brørup
Mattias, Please note that most of Thomas' questions are in the interest of the general public, considered requests for further documentation. > Do you have benchmarks results of the modules using such variables > (power, random, service)? > It would be interesting to compare time efficiency and

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

2024-10-11 Thread Mattias Rönnblom
On 2024-10-10 23:24, Thomas Monjalon wrote: Hello, This new feature looks to bring something interesting to DPDK. There was a good amount of discussion and review, and there is a real effort of documentation. However, some choices done in this implementation were not explained or advertised eno

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

2024-10-10 Thread Thomas Monjalon
Hello, This new feature looks to bring something interesting to DPDK. There was a good amount of discussion and review, and there is a real effort of documentation. However, some choices done in this implementation were not explained or advertised enough in the documentation, in my opinion. I th

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

2024-10-10 Thread Stephen Hemminger
On Thu, 10 Oct 2024 18:17:56 +0200 Mattias Rönnblom wrote: > On 2024-10-10 17:54, Stephen Hemminger wrote: > > On Thu, 10 Oct 2024 16:21:59 +0200 > > Mattias Rönnblom wrote: > > > >> Introduce DPDK per-lcore id variables, or lcore variables for short. > >> > >> An lcore variable has one value

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

2024-10-10 Thread Mattias Rönnblom
On 2024-10-10 17:54, Stephen Hemminger wrote: On Thu, 10 Oct 2024 16:21:59 +0200 Mattias Rönnblom wrote: 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 st

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

2024-10-10 Thread Stephen Hemminger
On Thu, 10 Oct 2024 16:21:59 +0200 Mattias Rönnblom wrote: > 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, frequent