[PATCH] power: use hugepage memory for queue list entry structure
Stephen Hemminger
stephen at networkplumber.org
Thu Feb 20 17:45:22 CET 2025
On Thu, 20 Feb 2025 16:39:52 +0000
Konstantin Ananyev <konstantin.ananyev at huawei.com> wrote:
> > -----Original Message-----
> > From: Stephen Hemminger <stephen at networkplumber.org>
> > Sent: Thursday, February 20, 2025 4:12 PM
> > To: lihuisong (C) <lihuisong at huawei.com>
> > Cc: dev at dpdk.org; thomas at monjalon.net; david.hunt at intel.com; anatoly.burakov at intel.com; sivaprasad.tummala at amd.com;
> > liuyonglong <liuyonglong at huawei.com>
> > Subject: Re: [PATCH] power: use hugepage memory for queue list entry structure
> >
> > On Thu, 20 Feb 2025 17:01:53 +0800
> > "lihuisong (C)" <lihuisong at huawei.com> wrote:
> >
> > > > The queue_list_entry structure data is used in rx_callback of io path
> > > > when enable PMD Power Management. However its memory is currently from
> > > > normal heap memory. For better performance, use hugepage memory to
> > > > replace it.
> > > >
> > > > Signed-off-by: Huisong Li <lihuisong at huawei.com>
> >
> > How is that in a hot path where this could matter?
>
> AFAIU - it is used in RX/TX callbacks that power library installs,
> so I presume will get hit on every eth_rx_burst/tx_burst calls.
>
> > The safety rails in rte_malloc() are much less than regular malloc().
> > I prefer some degree of safety from checkers and malloc library internals.
>
> Didn't get your point - what's suddenly wrong with rte_malloc()?
Coverity and Gcc analyzer treat malloc as special case.
With attributes rte_malloc gets similar treatment but not quite as much.
Also internally, malloc and free have more heap pool sanity checks.
In name of performance, those don't exist in rte_malloc().
Lastly hugepages are limited resource, so they should only be used when needed.
More information about the dev
mailing list