diff mbox

[3/3,v2] linux-generic: cpumask: warn that CPU0 is used by control and worker thread

Message ID 1447166428-23791-4-git-send-email-ivan.khoronzhuk@linaro.org
State Superseded
Headers show

Commit Message

Ivan Khoronzhuk Nov. 10, 2015, 2:40 p.m. UTC
By default all control threads on CPU0, and odp_cpumask_default_control
returns it. It shouldn't overlap with worker cpumask, but for some
cases it's correct to use potential processing capability, so better
leave this choice to application and only draw attention to it when
cpumask for worker thread is read.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
 platform/linux-generic/odp_cpumask_task.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_cpumask_task.c b/platform/linux-generic/odp_cpumask_task.c
index 535891c..b4b4f23 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 control and worker thread.\n"
+			"\tIt can have impact on worker thread\n");
+
 	return cpu;
 }