Message ID | 1447943403-24803-4-git-send-email-ivan.khoronzhuk@linaro.org |
---|---|
State | Accepted |
Commit | 7294ab04a6b8dd06889e27165a5fdfc1edf436c3 |
Headers | show |
Not timer-related but as it is part of the same patch set I reviewed it. On 19 November 2015 at 15:30, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> wrote: > By default, all control threads execute on CPU 0 and > odp_cpumask_default_control() returns this CPU. For reasons of > performance, control and worker CPU's shouldn't overlap but for some > scenarios it can be desirable to utilize all CPU's for worker threads. > Thus we leave the decision of CPU allocation to the user but report > when a CPU is used for both control and worker threads. > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> > Reviewed-by: Ola Liljedahl <ola.liljedahl@linaro.org> > --- > platform/linux-generic/odp_cpumask_task.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/platform/linux-generic/odp_cpumask_task.c > b/platform/linux-generic/odp_cpumask_task.c > index 535891c..49dbdb7 100644 > --- a/platform/linux-generic/odp_cpumask_task.c > +++ b/platform/linux-generic/odp_cpumask_task.c > @@ -40,6 +40,10 @@ int odp_cpumask_default_worker(odp_cpumask_t *mask, int > num) > } > } > > + if (odp_cpumask_isset(mask, 0)) > + ODP_DBG("\n\tCPU0 will be used for both control and worker > threads,\n" > + "\tthis will likely have a performance impact on > the worker thread.\n"); > + > return cpu; > } > > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/linux-generic/odp_cpumask_task.c b/platform/linux-generic/odp_cpumask_task.c index 535891c..49dbdb7 100644 --- a/platform/linux-generic/odp_cpumask_task.c +++ b/platform/linux-generic/odp_cpumask_task.c @@ -40,6 +40,10 @@ int odp_cpumask_default_worker(odp_cpumask_t *mask, int num) } } + if (odp_cpumask_isset(mask, 0)) + ODP_DBG("\n\tCPU0 will be used for both control and worker threads,\n" + "\tthis will likely have a performance impact on the worker thread.\n"); + return cpu; }
By default, all control threads execute on CPU 0 and odp_cpumask_default_control() returns this CPU. For reasons of performance, control and worker CPU's shouldn't overlap but for some scenarios it can be desirable to utilize all CPU's for worker threads. Thus we leave the decision of CPU allocation to the user but report when a CPU is used for both control and worker threads. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- platform/linux-generic/odp_cpumask_task.c | 4 ++++ 1 file changed, 4 insertions(+)