From patchwork Tue Nov 10 14:40:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 56327 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp809905lbb; Tue, 10 Nov 2015 06:42:46 -0800 (PST) X-Received: by 10.55.78.195 with SMTP id c186mr4588047qkb.41.1447166566480; Tue, 10 Nov 2015 06:42:46 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z62si3122762qgd.79.2015.11.10.06.42.46; Tue, 10 Nov 2015 06:42:46 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 1C28F61D08; Tue, 10 Nov 2015 14:42:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3D0F961D18; Tue, 10 Nov 2015 14:41:05 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7D64961D25; Tue, 10 Nov 2015 14:41:02 +0000 (UTC) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by lists.linaro.org (Postfix) with ESMTPS id A98FA61D08 for ; Tue, 10 Nov 2015 14:40:39 +0000 (UTC) Received: by lbblt2 with SMTP id lt2so102330495lbb.3 for ; Tue, 10 Nov 2015 06:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RUBQqB3cjP3lUuBrDs/zLT3Y3Psr13T1WmwuB7hNGIU=; b=MnvCULg0O1xBWgDBURkTd8JPS6NwND2iM6qh4KdbOcVrBOFd9ZwRDRRzw3hoUSu3Et kokAP1/apEzo46SCsaq4rRq+BxepNCAmLrGP1FYH+R968ZHq1wrCw5OeuL2PaiO7dPKv le317Nu4Gx4eUiW/AddH2Pjvy3bKcv8EaN4/qZl3z4xbh1AzSFiD8/efJ9G3pONb+9ZK E26cnyGKUbanhb7EMzaXhJ4itxmna8p7mwjsoAFsnNy0DaIfSsU/TJBtFMfhQLiXyGDe C5OkEd87Zqrz+CKLfYdZsESOi2iGzjagIJ57YW3l33r7yJGXQu/nvdVJhfdBROVDfHe+ Iz+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RUBQqB3cjP3lUuBrDs/zLT3Y3Psr13T1WmwuB7hNGIU=; b=at/hqK0mHHBJkznpTnA79TBY5OWbMOTmjxutZdOcN84iBwo/ybYAl7AAkBcuewWRsU HFt5y5MSuDIk2AxBBBd3Rlp4FRI7r3NMX10+SkaYNyoSeZTNp2/UO74mhmrEiqPw5HXg TowdcTZSR7nxNTYrsgdTfivofb5jU3I7GGsFNpSuzDTOKGzB7tJ0qk2Zg0TWnTZlKqtI UUyJxiS+IeflZg7kZc+X132K4WJ+SzUUw3mibF++/0JUn9F6Nr6ARk1bnGnq/30Ob5OG ENvj05p1kR2Xd9DTlN0A+T324S+Weg1lvdWxWC0K7msybS9XGppcQq7jYU64EPMKdu/2 76tQ== X-Gm-Message-State: ALoCoQkl+klGbz1HIORuBgCUIyu/b6FfD/ZdcYRFSCkUuVT5vZbxOtP0eCEyYfNtIHnFCWhb6Ev1 X-Received: by 10.112.54.130 with SMTP id j2mr1556532lbp.120.1447166438501; Tue, 10 Nov 2015 06:40:38 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id tp5sm567643lbb.27.2015.11.10.06.40.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Nov 2015 06:40:37 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Tue, 10 Nov 2015 16:40:28 +0200 Message-Id: <1447166428-23791-4-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447166428-23791-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1447166428-23791-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/3 v2] linux-generic: cpumask: warn that CPU0 is used by control and worker thread X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" 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 --- 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..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; }