From: Fengnan Chang <changfengnan@bytedance.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: anatoly.burakov@intel.com, dev@dpdk.org
Subject: Re: [External] Re: [RFC PATCH] move memset out of hold lock when rte_free
Date: Tue, 12 Sep 2023 17:13:11 +0800 [thread overview]
Message-ID: <CAPFOzZu529V8Lg0CKWfGmDYpFSb87y5FxGNb+1-fKvoAQrs5rg@mail.gmail.com> (raw)
In-Reply-To: <CAPFOzZs2pkBCROC+6=cvt-3x+A8Pi2QMdeL0k0-qqWZy34bk4Q@mail.gmail.com>
This problem had fix in this patch
http://patches.dpdk.org/project/dpdk/patch/20230912090415.48709-1-changfengnan@bytedance.com/
I'm doing long-term test, especially rte_zmalloc.
Fengnan Chang <changfengnan@bytedance.com> 于2023年9月12日周二 10:44写道:
>
> This patch still have problem, I'll fix next version.
>
> Stephen Hemminger <stephen@networkplumber.org> 于2023年9月6日周三 23:08写道:
> >
> > On Thu, 31 Aug 2023 19:19:37 +0800
> > Fengnan Chang <changfengnan@bytedance.com> wrote:
> >
> > > +#ifndef RTE_MALLOC_DEBUG
> > > + if (internal_conf->legacy_mem) {
> > > + /* If orig_elem is dirty, the joint element is clean, we need do memset now */
> > > + if (elem->orig_elem->dirty && !elem->dirty)
> > > + memset(ptr, 0, data_len);
> > > + } else if (!elem->dirty) {
> > > + memset(ptr, 0, data_len);
> > > + }
> > > +#else
> > > + /* Always poison the memory in debug mode. */
> > > + memset(ptr, MALLOC_POISON, data_len);
> > > +#endif
> >
> > The code reads better if positive clause was first.
>
> Got it, I'll do as you suggest in next version.
> > I.e.
> >
> > #ifdef RTE_MALLOC_DEBUG
> > /* Always poison the memory in debug mode. */
> > memset(ptr, MALLOC_POISON, data_len);
> > #else
> > ...
prev parent reply other threads:[~2023-09-12 9:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 11:19 Fengnan Chang
2023-09-06 15:08 ` Stephen Hemminger
2023-09-12 2:44 ` [External] " Fengnan Chang
2023-09-12 9:13 ` Fengnan Chang [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=CAPFOzZu529V8Lg0CKWfGmDYpFSb87y5FxGNb+1-fKvoAQrs5rg@mail.gmail.com \
--to=changfengnan@bytedance.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/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).