All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: "mannywang(王永峰)" <mannywang@tencent.com>,
	"Konstantin Ananyev" <konstantin.ananyev@huawei.com>
Cc: dev@dpdk.org
Subject: Re: [Internet]Re: [PATCH v3] acl: support custom memory allocator
Date: Wed, 26 Nov 2025 10:57:33 +0300	[thread overview]
Message-ID: <cb7c53de-bc26-42c1-8695-00a4a335ebef@gmail.com> (raw)
In-Reply-To: <7E45BE076ACCC3B2+d9eeffa0-a442-4766-b45f-406cd99700e9@tencent.com>

On 11/26/25 05:44, mannywang(王永峰) wrote:
> Thanks for sharing this suggestion.
>
> We actually evaluated the heap-based approach before implementing this 
> patch.
> It can help in some scenarios, but unfortunately it does not fully 
> solve our
> use cases. Specifically:
>
> 1. **Heap count / scalability**
>    Our application maintains at least ~200 rte_acl_ctx instances (due 
> to the
>    total rule count and multi-tenant isolation). Allowing a dedicated 
> heap per
>    context would exceed the practical limits of the current rte_malloc 
> heap
>    model. The number of heaps that can be created is not unlimited, and
>    maintaining hundreds of separate heaps would introduce considerable
>    management overhead.
This is a valid point against heaps, thanks.
> 2. **Temporary allocations in build stage**
>    During `rte_acl_build`, a significant portion of memory is 
> allocated through
>    `calloc()` for internal temporary structures. These allocations are 
> freed
>    right after the build completes. Even if runtime memory could come 
> from a
>    custom heap, these temporary allocations would still need an 
> independent
>    allocator or callback mechanism to avoid fragmentation and repeated
>    malloc/free cycles.
I don't understand the build stage issue and why it needs a custom 
allocator.
What exactly gets fragmented?
It is the entire process address space which is practically unlimited?
How does is malloc/free overhead compare to the overall ACL build time?

  reply	other threads:[~2025-11-26  7:57 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14  2:51 [RFC] rte_acl_build memory fragmentation concern and proposal for external memory support mannywang(王永峰)
2025-11-17 12:51 ` Konstantin Ananyev
2025-11-25  9:40   ` [PATCH] acl: support custom memory allocator =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-25 12:06   ` [PATCH v2] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-25 12:14   ` [PATCH v3] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-25 14:59     ` Stephen Hemminger
2025-11-26  2:37       ` [Internet]Re: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-25 18:01     ` Dmitry Kozlyuk
2025-11-26  2:44       ` [Internet]Re: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-26  7:57         ` Dmitry Kozlyuk [this message]
2025-11-26  8:09           ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-26 21:28             ` Stephen Hemminger
2025-11-27  2:05               ` [Internet]Re: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-11-28 13:26     ` Konstantin Ananyev
2025-11-28 15:07       ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-01 12:05       ` [PATCH v4] acl: support custom memory allocators in rte_acl_build =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-01 15:59         ` Patrick Robb
2025-12-01 16:42         ` Stephen Hemminger
2025-12-02  9:33           ` [Internet]Re: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-01 12:45       ` [PATCH v5] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-02  2:47         ` fengchengwen
2025-12-02  9:25           ` [PATCH v6] acl: support custom memory allocators =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-08  9:43             ` Konstantin Ananyev
2025-12-08 12:48               ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-08 19:29               ` Stephen Hemminger
2025-12-09  2:30                 ` [Internet]Re: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-09 11:06                 ` Konstantin Ananyev
2025-12-10  4:09                   ` fengchengwen
2025-12-08 12:57             ` [PATCH v7] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-09 10:59               ` Konstantin Ananyev
2025-12-09 12:56                 ` [Internet]RE: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-09 12:52               ` [PATCH v8] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-12 15:00                 ` Konstantin Ananyev
2025-12-12 16:41                   ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-12 16:37                 ` [PATCH v9] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-13  1:27                 ` [PATCH v10] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-15  9:48                   ` Konstantin Ananyev
2025-12-15 14:43                     ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-15 14:38                   ` [PATCH v11] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-17 13:06                     ` [PATCH v12] " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2026-02-17 12:04                       ` Thomas Monjalon
2025-12-02  9:31           ` [Internet]Re: [PATCH v5] acl: support custom memory allocators in rte_acl_build =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-11  1:46     ` [PATCH v3] acl: support custom memory allocator Stephen Hemminger
2025-12-11  2:22       ` [Internet]Re: " =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-11  2:29       ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=
2025-12-11 13:04       ` =?gb18030?B?bWFubnl3YW5nKM3108C35Sk=?=

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=cb7c53de-bc26-42c1-8695-00a4a335ebef@gmail.com \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@huawei.com \
    --cc=mannywang@tencent.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.