> -----Original Message----- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT > Ivan Khoronzhuk > Sent: Tuesday, April 19, 2016 6:49 PM > To: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] odp_cpumask_default_worker() and availability of > the returned CPU's > > > > On 19.04.16 18:31, Zoltan Kiss wrote: > > Hi, > > > > A quick question: my understanding is that odp_cpumask_default_worker() > returns the available CPU's, but it doesn't guarantee that when you start > your thread's/processes they will be still available, right? It should be > the applications responsibility to not start more threads than it wants on > the same CPU. > > Also, I understood that it is not a strict requirement to have one > thread per CPU, just a best practice, and it's legal to start more of them > on the same CPU (just highly not advised) > > Even more, it returns only available CPUs for worker threads only and a > thread can run on several CPUs also (like it's done already for main > control thread)... > CPU usage is user responsibility, and that's a problem for some API usage > that bases it's calculations on per CPU registers....like > odp_cpu_cycle.... > A user should pay attention on it while configuration.
It depends on implementation if threads must be pinned always, or if multiple threads may share a CPU. This should be documented in implementation documentation and application/user should create and pin threads accordingly. Single, pinned thread per CPU should work always. -Petri _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp