From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: "Mattias Rönnblom" <hofors@lysator.liu.se>,
dev@dpdk.org,
"Konstantin Ananyev" <konstantin.ananyev@huawei.com>,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
"Yogaraj Baskaravel" <yogaraj.baskaravel@ericsson.com>,
"Stephen Hemminger" <stephen@networkplumber.org>
Subject: Re: [RFC v4 0/3] lib/fastmem: fast small-object allocator
Date: Wed, 12 Aug 2026 13:35:09 +0100 [thread overview]
Message-ID: <anxofR25oKeYXAHa@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35F659D1@smartserver.smartshare.dk>
On Mon, Aug 10, 2026 at 06:09:59PM +0200, Morten Brørup wrote:
> > 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.
>
This is an issue with many DPDK libraries, even rings and most mempool
implementations. I think it's up to the app developer to ensure that
preemption of non-EAL threads does not cause data-plane issues.
/Bruce
next prev parent reply other threads:[~2026-08-12 12:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 10:36 [RFC 0/3] lib/fastmem: fast small-object allocator Mattias Rönnblom
2026-05-25 10:36 ` [RFC 1/3] doc: add fastmem programming guide Mattias Rönnblom
2026-05-25 10:36 ` [RFC 2/3] lib: add fastmem library Mattias Rönnblom
2026-05-27 14:22 ` Stephen Hemminger
2026-05-27 17:25 ` Mattias Rönnblom
2026-05-25 10:36 ` [RFC 3/3] app/test: add fastmem test suite Mattias Rönnblom
2026-05-26 8:57 ` [RFC v2 0/3] lib/fastmem: fast small-object allocator Mattias Rönnblom
2026-05-26 8:57 ` [RFC v2 1/3] doc: add fastmem programming guide Mattias Rönnblom
2026-05-26 8:57 ` [RFC v2 2/3] lib: add fastmem library Mattias Rönnblom
2026-05-26 13:23 ` Stephen Hemminger
2026-05-27 10:12 ` Mattias Rönnblom
2026-05-27 10:18 ` Bruce Richardson
2026-05-27 11:17 ` Mattias Rönnblom
2026-05-27 11:17 ` Morten Brørup
2026-05-27 11:29 ` Mattias Rönnblom
2026-05-27 12:03 ` Morten Brørup
2026-05-26 8:57 ` [RFC v2 3/3] app/test: add fastmem test suite Mattias Rönnblom
2026-05-27 17:30 ` [RFC v3 0/3] lib/fastmem: fast small-object allocator Mattias Rönnblom
2026-05-27 17:30 ` [RFC v3 1/3] doc: add fastmem programming guide Mattias Rönnblom
2026-05-30 9:26 ` [RFC v4 0/3] lib/fastmem: fast small-object allocator Mattias Rönnblom
2026-05-30 9:26 ` [RFC v4 1/3] doc: add fastmem programming guide Mattias Rönnblom
2026-05-30 9:26 ` [RFC v4 2/3] lib: add fastmem library Mattias Rönnblom
2026-08-13 11:32 ` Morten Brørup
2026-08-13 15:30 ` Morten Brørup
2026-05-30 9:26 ` [RFC v4 3/3] app/test: add fastmem test suite Mattias Rönnblom
2026-06-10 12:35 ` [RFC v4 0/3] lib/fastmem: fast small-object allocator Konstantin Ananyev
2026-08-10 16:09 ` Morten Brørup
2026-08-12 12:35 ` Bruce Richardson [this message]
2026-05-27 17:30 ` [RFC v3 2/3] lib: add fastmem library Mattias Rönnblom
2026-05-28 9:11 ` Morten Brørup
2026-05-28 14:45 ` Varghese, Vipin
2026-05-28 19:56 ` Morten Brørup
2026-05-29 14:29 ` Varghese, Vipin
2026-05-30 16:22 ` Mattias Rönnblom
2026-05-27 17:30 ` [RFC v3 3/3] app/test: add fastmem test suite Mattias Rönnblom
2026-05-28 9:02 ` [RFC v3 0/3] lib/fastmem: fast small-object allocator Morten Brørup
2026-05-25 14:30 ` [RFC " Stephen Hemminger
2026-05-25 19:39 ` Mattias Rönnblom
2026-05-25 22:18 ` Stephen Hemminger
2026-05-26 7:01 ` Mattias Rönnblom
2026-05-25 18:36 ` Stephen Hemminger
2026-05-25 19:43 ` Mattias Rönnblom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=anxofR25oKeYXAHa@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=hofors@lysator.liu.se \
--cc=konstantin.ananyev@huawei.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.org \
--cc=yogaraj.baskaravel@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox