DPDK patches and discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"lucp.at.work@gmail.com" <lucp.at.work@gmail.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	Ruifeng Wang <Ruifeng.Wang@arm.com>, nd <nd@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH] doc: abstract the behaviour of rte_ctrl_thread_create
Date: Mon, 23 Aug 2021 21:18:16 +0000	[thread overview]
Message-ID: <DBAPR08MB58145E6F9E8CF350A91ADFE298C49@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <YSNtDFxq/tzyWpbh@platinum>

<snip>

> > >
> > > 30/07/2021 23:44, Honnappa Nagarahalli:
> > > > The current expected behaviour of the function
> > > > rte_ctrl_thread_create is rigid which makes the implementation of the
> function complex.
> > > > Make the expected behaviour abstract to allow for simplified
> > > > implementation.
> > > >
> > > > With this change, the calls to pthread_setaffinity_np can be moved
> > > > to the control thread. This will avoid the use of
> > > > pthread_barrier_wait and simplify the synchronization mechanism
> > > > between rte_ctrl_thread_create and the calling thread.
> > > >
> > > > Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> > > > ---
> > > > +* eal: The expected behaviour of the function
> > > > +``rte_ctrl_thread_create``
> > > > +  abstracted to allow for simplified implementation. The new
> > > > +behaviour is
> > > > +  as follows:
> > > > +  Creates a control thread with the given name. The affinity of
> > > > +the new
> > > > +  thread is based on the CPU affinity retrieved at the time
> > > > +rte_eal_init()
> > > > +  was called, the dataplane and service lcores are then excluded.
> > >
> > > I don't understand what is different of the current API:
> > >  * Wrapper to pthread_create(), pthread_setname_np() and
> > >  * pthread_setaffinity_np(). The affinity of the new thread is based
> > >  * on the CPU affinity retrieved at the time rte_eal_init() was
> > > called,
> > >  * the dataplane and service lcores are then excluded.
> > My concern is for the word "Wrapper". I am not sure how much we are
> bound by that to keep the code as a "wrapper".
> > The new patch does not change the high level behavior.
> 
> I am ok to remove the word "wrapper" from the description, and I agree it can
> be better described without quoting the pthread_* functions.
> 
> > Are you saying you are ok with the patch without the deprecation notice?
> 
> I don't think it requires a deprecation notice if the API and ABI is left
> unchanged. To be honnest, I find a bit hard to understand what is really
> changed by reading the deprecation notice:
Thanks Olivier. I agree, I was also not sure. The term "wrapper" made me feel that we are defining certain return codes to the application.

At the macro level, I think the expected behavior remains the same.

> 
> > +* eal: The expected behaviour of the function
> > +``rte_ctrl_thread_create``
> > +  abstracted to allow for simplified implementation. The new
> > +behaviour is
> > +  as follows:
> > +  Creates a control thread with the given name. The affinity of the
> > +new
> > +  thread is based on the CPU affinity retrieved at the time
> > +rte_eal_init()
> > +  was called, the dataplane and service lcores are then excluded.
> 
> I'll send my comments to your patch:
> http://patches.dpdk.org/project/dpdk/patch/20210802051652.3611-1-
> honnappa.nagarahalli@arm.com/
> 
> 
> Thanks,
> Olivier

      reply	other threads:[~2021-08-23 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 21:44 Honnappa Nagarahalli
2021-08-03  5:54 ` Ruifeng Wang
2021-08-03  7:25   ` Jerin Jacob
2021-08-03 15:49     ` Honnappa Nagarahalli
2021-08-07 14:55 ` Thomas Monjalon
2021-08-09 13:18   ` Honnappa Nagarahalli
2021-08-23  9:40     ` Olivier Matz
2021-08-23 21:18       ` Honnappa Nagarahalli [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=DBAPR08MB58145E6F9E8CF350A91ADFE298C49@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=lucp.at.work@gmail.com \
    --cc=nd@arm.com \
    --cc=olivier.matz@6wind.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).