RE: [RFC v4 0/3] lib/fastmem: fast small-object allocator

Morten Brørup <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
> 3. Per-lcore caches: bounded LIFO stacks (no locks on the hot
>    path). Cache misses trigger bulk transfers to/from the shared
>    bin under a spinlock.

I haven't looked at the v4 code in detail, so forgive me if my concern is already addressed.

I am worried that a non-EAL thread can be preempted while holding a fastmem lock.
Could this cause an EAL thread to stall in the fastmem lib under the wrong circumstances?
If so, can this be avoided in any way?

The Lock-Free Stack has a solution using single-linked lists and a 128-bit CAS operation.
The solution is quite slow (due to linked list traversal with retry on collision), but progress is practically guaranteed.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.