Message ID | 1455782806-4787-2-git-send-email-christophe.milard@linaro.org |
---|---|
State | New |
Headers | show |
On 18 February 2016 at 09:27, Savolainen, Petri (Nokia - FI/Espoo) < petri.savolainen@nokia.com> wrote: > > > > -----Original Message----- > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of EXT > > Christophe Milard > > Sent: Thursday, February 18, 2016 10:07 AM > > To: mike.holmes@linaro.org; bill.fischofer@linaro.org > > Cc: lng-odp@lists.linaro.org > > Subject: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP thread more > > precisely > > > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org> > > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> > > --- > > doc/glossary.adoc | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/doc/glossary.adoc b/doc/glossary.adoc > > index 8e514ee..becaf16 100644 > > --- a/doc/glossary.adoc > > +++ b/doc/glossary.adoc > > @@ -9,9 +9,17 @@ control thread:: > > A control thread is a type of ODP thread. It will be isolated from > > the host > > operating system house keeping tasks but will be scheduled by it and > > may > > receive interrupts. > > +ODP instantiation process:: > > + The first process which is started when an ODP application is > > started. > > + There is one single such process per ODP instantiation. > > > This is the one that called odp_init_global(). There can be only one > global init per instance. > > > > thread:: > > - An ODP thread is a flow of execution that in a Linux environment > > could be > > - a Linux process or thread. > > + the word thread (without any further specification) refers to an ODP > > + thread. > > +ODP thread:: > > + An ODP thread is a flow of execution that belongs to ODP. In a Linux > > + environment an ODP thread can be either a Linux process or a linux > > thread. > > + In both cases, a linux process (or thread) is said to be an ODP > > thread if > > + its PID is a descendant of the ODP instantiation process. > > > An implementation could also support other than child processes joining an > instance, so this definition is too narrow. We'll need to add an ODP > instance ID param into local init, but other than that, its implementation > specific how ODP threads join an ODP instance (not always parent -> child > connection). Also, can the instantiation process exit ODP? On some > implementation it could and the instance terminates when the last ODP > thread exits it. > > > So in general terms ODP thread in Linux: any pthread or process that is > running as part of an ODP instance (have called odp_init_local()). > Thanks for your comments, Petri: I understand your point, I was no really sure my definition was the best, but is was the best Gary and me could find. Now, you say : " So in general terms ODP thread in Linux: any pthread or process that is running as part of an ODP instance (have called odp_init_local())." Why do you limit that definition to linux? Can we simply write that the instantiation thread is the one calling ODP_init_global and ODP threads are those calling ODP_init_local. On any implementation? If not what is the definition of an ODP thread? (independentely of the ODP implemetation) Christophe > > > -Petri > >
On 18 February 2016 at 09:50, Savolainen, Petri (Nokia - FI/Espoo) < petri.savolainen@nokia.com> wrote: > > > > > *From:* EXT Christophe Milard [mailto:christophe.milard@linaro.org] > *Sent:* Thursday, February 18, 2016 10:40 AM > *To:* Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia.com> > *Cc:* mike.holmes@linaro.org; bill.fischofer@linaro.org; > lng-odp@lists.linaro.org > *Subject:* Re: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP thread > more precisely > > > > > > > > On 18 February 2016 at 09:27, Savolainen, Petri (Nokia - FI/Espoo) < > petri.savolainen@nokia.com> wrote: > > > > > -----Original Message----- > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of EXT > > Christophe Milard > > Sent: Thursday, February 18, 2016 10:07 AM > > To: mike.holmes@linaro.org; bill.fischofer@linaro.org > > Cc: lng-odp@lists.linaro.org > > Subject: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP thread more > > precisely > > > > Signed-off-by: Christophe Milard <christophe.milard@linaro.org> > > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> > > --- > > doc/glossary.adoc | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/doc/glossary.adoc b/doc/glossary.adoc > > index 8e514ee..becaf16 100644 > > --- a/doc/glossary.adoc > > +++ b/doc/glossary.adoc > > @@ -9,9 +9,17 @@ control thread:: > > A control thread is a type of ODP thread. It will be isolated from > > the host > > operating system house keeping tasks but will be scheduled by it and > > may > > receive interrupts. > > +ODP instantiation process:: > > + The first process which is started when an ODP application is > > started. > > + There is one single such process per ODP instantiation. > > This is the one that called odp_init_global(). There can be only one > global init per instance. > > > > thread:: > > - An ODP thread is a flow of execution that in a Linux environment > > could be > > - a Linux process or thread. > > + the word thread (without any further specification) refers to an ODP > > + thread. > > +ODP thread:: > > + An ODP thread is a flow of execution that belongs to ODP. In a Linux > > + environment an ODP thread can be either a Linux process or a linux > > thread. > > + In both cases, a linux process (or thread) is said to be an ODP > > thread if > > + its PID is a descendant of the ODP instantiation process. > > > An implementation could also support other than child processes joining an > instance, so this definition is too narrow. We'll need to add an ODP > instance ID param into local init, but other than that, its implementation > specific how ODP threads join an ODP instance (not always parent -> child > connection). Also, can the instantiation process exit ODP? On some > implementation it could and the instance terminates when the last ODP > thread exits it. > > > So in general terms ODP thread in Linux: any pthread or process that is > running as part of an ODP instance (have called odp_init_local()). > > > > Thanks for your comments, Petri: > > I understand your point, I was no really sure my definition was the best, > but is was the best Gary and me could find. > > Now, you say : " So in general terms ODP thread in Linux: any pthread or > process that is running as part of an ODP instance (have called > odp_init_local())." > > Why do you limit that definition to linux? > > > > Can we simply write that the instantiation thread is the one calling > ODP_init_global and ODP threads are those calling ODP_init_local. On any > implementation? If not what is the definition of an ODP thread? > (independentely of the ODP implemetation) > > > > Yes, that’s basically the definition. A call to init_global creates an > instance and a call to init_local joins the calling thread into that > instance. > > > > Linux is so common platform that it’s good to use that as an example and > explicitly state that both pthreads and processes can be “ODP threads”. > > > > -Petri > > > > > > > > Christophe > > > > -Petri > > > But can we ignore totally the notion of descendance in this definition? you wrote: "An implementation could also support other than child processes joining an instance, so this definition is too narrow.". Now, if we have 2 (ore more) instances of ODP running in the same machine, and a foreign process (also linked with ODP lib, I assume, but not child of the instantiation process) calls odp_init_local()... What instance of ODP does this process join? Christophe. > >
I am willing to put the following definitions: ODP instantiation process:: The process calling +odp_init_global()+, which is probably the first process which is started when an ODP application is started. There is one single such process per ODP instantiation. ODP thread:: An ODP thread is a flow of execution that belongs to ODP. Any process or thread descendant of an ODP instantiation process and calling +odp_init_local()+ becomes an ODP thread of that instance. Note that, in a Linux environment an ODP thread can be either a Linux process or a linux thread (i.e a linux process calling +odp_init_local()+ will be refered as ODP thread, not ODP process). If this is not correct... what should it be :-) Christophe. On 18 February 2016 at 10:29, Christophe Milard < christophe.milard@linaro.org> wrote: > > > On 18 February 2016 at 09:50, Savolainen, Petri (Nokia - FI/Espoo) < > petri.savolainen@nokia.com> wrote: > >> >> >> >> >> *From:* EXT Christophe Milard [mailto:christophe.milard@linaro.org] >> *Sent:* Thursday, February 18, 2016 10:40 AM >> *To:* Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia.com> >> *Cc:* mike.holmes@linaro.org; bill.fischofer@linaro.org; >> lng-odp@lists.linaro.org >> *Subject:* Re: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP >> thread more precisely >> >> >> >> >> >> >> >> On 18 February 2016 at 09:27, Savolainen, Petri (Nokia - FI/Espoo) < >> petri.savolainen@nokia.com> wrote: >> >> >> >> > -----Original Message----- >> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of >> EXT >> > Christophe Milard >> > Sent: Thursday, February 18, 2016 10:07 AM >> > To: mike.holmes@linaro.org; bill.fischofer@linaro.org >> > Cc: lng-odp@lists.linaro.org >> > Subject: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP thread more >> > precisely >> > >> > Signed-off-by: Christophe Milard <christophe.milard@linaro.org> >> > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> >> > --- >> > doc/glossary.adoc | 12 ++++++++++-- >> > 1 file changed, 10 insertions(+), 2 deletions(-) >> > >> > diff --git a/doc/glossary.adoc b/doc/glossary.adoc >> > index 8e514ee..becaf16 100644 >> > --- a/doc/glossary.adoc >> > +++ b/doc/glossary.adoc >> > @@ -9,9 +9,17 @@ control thread:: >> > A control thread is a type of ODP thread. It will be isolated from >> > the host >> > operating system house keeping tasks but will be scheduled by it >> and >> > may >> > receive interrupts. >> > +ODP instantiation process:: >> > + The first process which is started when an ODP application is >> > started. >> > + There is one single such process per ODP instantiation. >> >> This is the one that called odp_init_global(). There can be only one >> global init per instance. >> >> >> > thread:: >> > - An ODP thread is a flow of execution that in a Linux environment >> > could be >> > - a Linux process or thread. >> > + the word thread (without any further specification) refers to an >> ODP >> > + thread. >> > +ODP thread:: >> > + An ODP thread is a flow of execution that belongs to ODP. In a >> Linux >> > + environment an ODP thread can be either a Linux process or a linux >> > thread. >> > + In both cases, a linux process (or thread) is said to be an ODP >> > thread if >> > + its PID is a descendant of the ODP instantiation process. >> >> >> An implementation could also support other than child processes joining >> an instance, so this definition is too narrow. We'll need to add an ODP >> instance ID param into local init, but other than that, its implementation >> specific how ODP threads join an ODP instance (not always parent -> child >> connection). Also, can the instantiation process exit ODP? On some >> implementation it could and the instance terminates when the last ODP >> thread exits it. >> >> >> So in general terms ODP thread in Linux: any pthread or process that is >> running as part of an ODP instance (have called odp_init_local()). >> >> >> >> Thanks for your comments, Petri: >> >> I understand your point, I was no really sure my definition was the best, >> but is was the best Gary and me could find. >> >> Now, you say : " So in general terms ODP thread in Linux: any pthread or >> process that is running as part of an ODP instance (have called >> odp_init_local())." >> >> Why do you limit that definition to linux? >> >> >> >> Can we simply write that the instantiation thread is the one calling >> ODP_init_global and ODP threads are those calling ODP_init_local. On any >> implementation? If not what is the definition of an ODP thread? >> (independentely of the ODP implemetation) >> >> >> >> Yes, that’s basically the definition. A call to init_global creates an >> instance and a call to init_local joins the calling thread into that >> instance. >> >> >> >> Linux is so common platform that it’s good to use that as an example and >> explicitly state that both pthreads and processes can be “ODP threads”. >> >> >> >> -Petri >> >> >> >> >> >> >> >> Christophe >> >> >> >> -Petri >> >> >> > But can we ignore totally the notion of descendance in this definition? > you wrote: "An implementation could also support other than child > processes joining an instance, so this definition is too narrow.". > Now, if we have 2 (ore more) instances of ODP running in the same machine, > and a foreign process (also linked with ODP lib, I assume, but not child of > the instantiation process) calls odp_init_local()... What instance of ODP > does this process join? > > Christophe. > >> >> > >
diff --git a/doc/glossary.adoc b/doc/glossary.adoc index 8e514ee..becaf16 100644 --- a/doc/glossary.adoc +++ b/doc/glossary.adoc @@ -9,9 +9,17 @@ control thread:: A control thread is a type of ODP thread. It will be isolated from the host operating system house keeping tasks but will be scheduled by it and may receive interrupts. +ODP instantiation process:: + The first process which is started when an ODP application is started. + There is one single such process per ODP instantiation. thread:: - An ODP thread is a flow of execution that in a Linux environment could be - a Linux process or thread. + the word thread (without any further specification) refers to an ODP + thread. +ODP thread:: + An ODP thread is a flow of execution that belongs to ODP. In a Linux + environment an ODP thread can be either a Linux process or a linux thread. + In both cases, a linux process (or thread) is said to be an ODP thread if + its PID is a descendant of the ODP instantiation process. event:: An event is a notification that can be placed in a queue. queue::
Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> --- doc/glossary.adoc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)