DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Cc: "lihuisong (C)" <lihuisong@huawei.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"david.hunt@intel.com" <david.hunt@intel.com>,
	"anatoly.burakov@intel.com" <anatoly.burakov@intel.com>,
	"sivaprasad.tummala@amd.com" <sivaprasad.tummala@amd.com>,
	liuyonglong <liuyonglong@huawei.com>
Subject: Re: [PATCH] power: use hugepage memory for queue list entry structure
Date: Thu, 20 Feb 2025 08:45:22 -0800	[thread overview]
Message-ID: <20250220084522.16c5930a@hermes.local> (raw)
In-Reply-To: <295b2b64b39c4a61b76158e4ff474e40@huawei.com>

On Thu, 20 Feb 2025 16:39:52 +0000
Konstantin Ananyev <konstantin.ananyev@huawei.com> wrote:

> > -----Original Message-----
> > From: Stephen Hemminger <stephen@networkplumber.org>
> > Sent: Thursday, February 20, 2025 4:12 PM
> > To: lihuisong (C) <lihuisong@huawei.com>
> > Cc: dev@dpdk.org; thomas@monjalon.net; david.hunt@intel.com; anatoly.burakov@intel.com; sivaprasad.tummala@amd.com;
> > liuyonglong <liuyonglong@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@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@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.

  reply	other threads:[~2025-02-20 16:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19  7:53 Huisong Li
2025-02-20  9:01 ` lihuisong (C)
2025-02-20  9:41   ` Konstantin Ananyev
2025-02-20 16:11   ` Stephen Hemminger
2025-02-20 16:39     ` Konstantin Ananyev
2025-02-20 16:45       ` Stephen Hemminger [this message]
2025-02-20 16:58         ` Konstantin Ananyev
2025-02-21 11:21         ` Burakov, Anatoly

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=20250220084522.16c5930a@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=thomas@monjalon.net \
    /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;
as well as URLs for NNTP newsgroup(s).