> -----Original Message-----
> From: lng-odp [mailto:[email protected]] On Behalf Of ext
> Maxim Uvarov
> Sent: Tuesday, June 09, 2015 1:14 PM
> To: [email protected]
> Subject: Re: [lng-odp] [API-NEXT PATCH v2 4/4] api: init: added thread
> type to local init
> 
> On 05/08/15 10:07, Petri Savolainen wrote:
> > --- a/helper/linux.c
> > +++ b/helper/linux.c
> > @@ -60,7 +60,7 @@ static void *odp_run_start_routine(void *arg)
> >     odp_start_args_t *start_args = arg;
> >
> >     /* ODP thread local init */
> > -   if (odp_init_local()) {
> > +   if (odp_init_local(ODP_THREAD_WORKER)) {
> >             ODP_ERR("Local init failed\n");
> >             return NULL;
> >     }
> > @@ -200,7 +200,7 @@ int odph_linux_process_fork_n(odph_linux_process_t
> *proc_tbl,
> >                     return -2;
> >             }
> >
> > -           if (odp_init_local()) {
> > +           if (odp_init_local(ODP_THREAD_WORKER)) {
> >                     ODP_ERR("Local init failed\n");
> >                     return -2;
> >             }
> 
> So you want to linux helper to fork only workers?
> odph_linux_process_fork_n is used only in
> ./test/performance/odp_scheduling.c where probably it can
> be control.

Yes, Linux helpers pin thread/processes to cpus. It is important to pin worker 
threads/processes, whereas control threads typically do not need pinning. 
Someone can write another helper for control threads, but it's less content 
because the pinning part is missing.

> 
> But I also don't understand what has to be in implementation of that
> worker/control. The only idea I have
> is to not init pktio and scheduler for control thread. Is that that main
> propose?

Both thread types can use all API calls. Implementation may reserve HW 
resources for worker threads for best performance, whereas ctrl threads may 
share resources and suffer lower performance, longer latencies, etc.

-Petri


> 
> Thanks,
> Maxim.
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to