From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
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>,
"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: Fri, 21 Feb 2025 12:21:59 +0100 [thread overview]
Message-ID: <989913f6-4a73-4db9-bd1b-6ee06b8f5321@intel.com> (raw)
In-Reply-To: <20250220084522.16c5930a@hermes.local>
On 20/02/2025 17:45, Stephen Hemminger wrote:
> 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.
The last thing I would associate with rte_malloc is performance. I'm not
sure I follow - which "sanity checks" were omitted from rte_malloc "in
the name of performance" that are present in regular malloc?
--
Thanks,
Anatoly
prev parent reply other threads:[~2025-02-21 11:22 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
2025-02-20 16:58 ` Konstantin Ananyev
2025-02-21 11:21 ` Burakov, Anatoly [this message]
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=989913f6-4a73-4db9-bd1b-6ee06b8f5321@intel.com \
--to=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=stephen@networkplumber.org \
--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).