patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: Phil Yang <Phil.Yang@arm.com>,
	Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>, nd <nd@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] eal: fix lcore state bug
Date: Fri, 8 May 2020 16:12:49 +0000	[thread overview]
Message-ID: <BYAPR11MB314339E24D0CC3DDC00469B8D7A20@BYAPR11MB3143.namprd11.prod.outlook.com> (raw)
In-Reply-To: <VE1PR08MB46405361FE30F51A917FFE63E9AA0@VE1PR08MB4640.eurprd08.prod.outlook.com>

> -----Original Message-----
> From: Phil Yang <Phil.Yang@arm.com>
> Sent: Thursday, April 30, 2020 3:54 AM
> To: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>; Van Haaren,
> Harry <harry.van.haaren@intel.com>; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>
> Cc: dev@dpdk.org; stable@dpdk.org; nd <nd@arm.com>; nd <nd@arm.com>
> Subject: RE: [dpdk-dev] [PATCH] eal: fix lcore state bug
> 
> > -----Original Message-----
> > From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
> > Sent: Thursday, April 30, 2020 5:32 AM
> > To: Phil Yang <Phil.Yang@arm.com>; Harry van Haaren
> > <harry.van.haaren@intel.com>; Jerin Jacob
> > <jerin.jacob@caviumnetworks.com>
> > Cc: dev@dpdk.org; stable@dpdk.org; nd <nd@arm.com>
> > Subject: Re: [dpdk-dev] [PATCH] eal: fix lcore state bug
> >
> > Hi Phil,
> >
> > W dniu 29.04.2020 o 17:07, Phil Yang pisze:
> > > Hi Lukasz,
> > >
> > >> -----Original Message-----
> > >> From: dev <dev-bounces@dpdk.org> On Behalf Of Lukasz Wojciechowski
> > >> Sent: Tuesday, April 28, 2020 9:22 AM
> > >> To: Harry van Haaren <harry.van.haaren@intel.com>; Jerin Jacob
> > >> <jerin.jacob@caviumnetworks.com>
> > >> Cc: dev@dpdk.org; l.wojciechow@partner.samsung.com;
> > stable@dpdk.org
> > >> Subject: [dpdk-dev] [PATCH] eal: fix lcore state bug
> > >>
> > >> The rte_service_lcore_reset_all function stops execution of services
> > >> on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE.
> > >> However the thread loop for slave lcores (eal_thread_loop) distincts
> > these
> > >> roles to set lcore state after processing delegated function.
> > >> It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE.
> > >> So changing the role to RTE before stopping work in slave lcores
> > >> causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait
> > >> must be run after rte_service_lcore_reset_all to bring back lcores to
> > >> launchable (WAIT) state.
> > >
> > > Is that make sense to call rte_eal_mp_wait_lcore() inside
> > rte_serice_lcore_reset_all() ?
> >
> > yeah, I thought about it and in my opinion the answer is no, because if
> > the function run on slave lcore is in FINISHED state it means, that
> > someone can still read the value returned by the function and the only
> > one who can be interested in the value is the one that delegated the
> > service.
> >
> > If we will wait for lcores to end their jobs, read the values and switch
> > them to WAIT state, the values will be lost. The application might need
> > to read them. We cannot take this possibility from it.

I understand that on exiting, the lcore state is different per service or rte lcore.
The goal was to leave the lcore thread in a state as if it was never used.

As Phil suggested, doing the wait() inside service cores achieves that.
Lukasz's point is that this hides the service core return code.

Is it really a problem if application is not getting access to the return code of the service lcore?
What do we expect the application will care about? Today I'm not aware of any service-lcore
return value that the application should be checking.

> Yeah. I think that is a good point.
> 
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> 
> >
> > > <snip>
> > >
> > > Thanks,
> > > Phil
> >
> > --
> >
> > Lukasz Wojciechowski
> > Principal Software Engineer
> >
> > Samsung R&D Institute Poland
> > Samsung Electronics
> > Office +48 22 377 88 25
> > l.wojciechow@partner.samsung.com


  parent reply	other threads:[~2020-05-08 16:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200428012204eucas1p120a84e501d0d64145c21476cd2562f36@eucas1p1.samsung.com>
2020-04-28  1:21 ` [dpdk-stable] " Lukasz Wojciechowski
2020-04-29  3:11   ` [dpdk-stable] [dpdk-dev] " Ruifeng Wang
2020-04-29 15:07   ` Phil Yang
2020-04-29 21:32     ` Lukasz Wojciechowski
2020-04-30  2:54       ` Phil Yang
2020-04-30  9:06         ` Lukasz Wojciechowski
2020-05-08 16:12         ` Van Haaren, Harry [this message]
2020-05-08 17:04           ` Lukasz Wojciechowski
2020-05-18 18:25   ` [dpdk-stable] " Lukasz Wojciechowski
2020-05-18 18:39     ` David Marchand
2020-05-18 18:43       ` Lukasz Wojciechowski
2020-05-20 11:40         ` Van Haaren, Harry
2020-05-20 12:47           ` Lukasz Wojciechowski
     [not found]   ` <CGME20200708133748eucas1p2dbe34d8605d8f618559daee9cbeaa73d@eucas1p2.samsung.com>
2020-07-08 13:37     ` [dpdk-stable] [PATCH v2] " Lukasz Wojciechowski
2020-07-08 14:52       ` Van Haaren, Harry
2020-07-08 17:10         ` David Marchand
2020-07-08 19:37           ` Lukasz Wojciechowski

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=BYAPR11MB314339E24D0CC3DDC00469B8D7A20@BYAPR11MB3143.namprd11.prod.outlook.com \
    --to=harry.van.haaren@intel.com \
    --cc=Phil.Yang@arm.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=l.wojciechow@partner.samsung.com \
    --cc=nd@arm.com \
    --cc=stable@dpdk.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).