[RFC 2/3] lib: add fastmem library
Mattias Rönnblom
hofors at lysator.liu.se
Wed May 27 19:25:50 CEST 2026
On 5/27/26 16:22, Stephen Hemminger wrote:
> On Mon, 25 May 2026 12:36:41 +0200
> Mattias Rönnblom <hofors at lysator.liu.se> wrote:
>
>> +
>> +static __rte_always_inline struct fastmem_cache *
>> +cache_get(struct fastmem_socket_state *socket, unsigned int class_idx,
>> + unsigned int lcore_id)
>
> Do not use always_inline. With current compilers using always inline
> makes the optimizer generate worse code. The only exceptions would
> be where inline is required to make assembly work or you have good benchmark
> data that proves that always_inline generates > 1% performance gain.
>
> To much of DPDK use __rte_always_inline as "cargo cult" it is faster setting.
__rte_always_inline is still useful, but it is rare. For example, it may
be required in certain situations to force constant propagation to
actually occur.
I'm removing both inline and always_inline. Doesn't make a difference,
so noise.
More information about the dev
mailing list