From: David Marchand <david.marchand@redhat.com>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"thomas@monjalon.net" <thomas@monjalon.net>, nd <nd@arm.com>
Subject: Re: [PATCH v2] eal: fix thread race in control thread creation
Date: Tue, 7 Mar 2023 14:53:34 +0100 [thread overview]
Message-ID: <CAJFAV8z-YNvg3k68b24rdnmRFPNAGvfOo_bJ4BLNU+Y9_UnGMQ@mail.gmail.com> (raw)
In-Reply-To: <DBAPR08MB5814AA6DECBF1C4A8F68B5E498B29@DBAPR08MB5814.eurprd08.prod.outlook.com>
On Thu, Mar 2, 2023 at 5:18 AM Honnappa Nagarahalli
<Honnappa.Nagarahalli@arm.com> wrote:
> > > > if (ctrl_thread_init(arg) != 0)
> > > > return NULL;
> > > >
> > > > - return start_routine(params->arg);
> > > > + return start_routine(start_arg);
> > > We can free 'params' here after 'start_routine' returns.
> >
> > I guess it doesn't matter if the allocation is retained for the duration of
> > start_routine() which could be ~long.
> Yes, that's what I thought, it is a small size.
>
> >
> > David/Honnappah let me know what you decide. if you'd prefer to change to
> > honnappah's suggestion i'll put a new version up.
Hum, how would it look like?
- the parent thread would free params if the child thread fails to set affinity,
- the child thread would free params otherwise,
Is this what you propose?
This works, but we have to be extra careful if any change is done in
this part later.
--
David Marchand
next prev parent reply other threads:[~2023-03-07 13:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 17:17 [PATCH] " Tyler Retzlaff
2023-03-01 8:19 ` David Marchand
2023-03-01 21:09 ` [PATCH v2] " Tyler Retzlaff
2023-03-02 1:30 ` Honnappa Nagarahalli
2023-03-02 1:45 ` Tyler Retzlaff
2023-03-02 4:08 ` Honnappa Nagarahalli
2023-03-07 13:53 ` David Marchand [this message]
2023-03-07 17:54 ` Tyler Retzlaff
2023-03-09 9:01 ` David Marchand
2023-03-01 21:07 Tyler Retzlaff
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=CAJFAV8z-YNvg3k68b24rdnmRFPNAGvfOo_bJ4BLNU+Y9_UnGMQ@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
--cc=roretzla@linux.microsoft.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).