From patchwork Tue Oct 27 15:53:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 55634 Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1876592lbq; Tue, 27 Oct 2015 08:54:03 -0700 (PDT) X-Received: by 10.55.77.205 with SMTP id a196mr16272522qkb.30.1445961243131; Tue, 27 Oct 2015 08:54:03 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 207si37576261qhx.43.2015.10.27.08.54.02; Tue, 27 Oct 2015 08:54:03 -0700 (PDT) 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 7AD2561D74; Tue, 27 Oct 2015 15:54:02 +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 77F9861996; Tue, 27 Oct 2015 15:53:56 +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 1448A61967; Tue, 27 Oct 2015 15:53:41 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by lists.linaro.org (Postfix) with ESMTPS id CFE4A618D3 for ; Tue, 27 Oct 2015 15:53:38 +0000 (UTC) Received: by lfaz124 with SMTP id z124so174955572lfa.1 for ; Tue, 27 Oct 2015 08:53:37 -0700 (PDT) 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; bh=TrAQWXquXQr9pNczU28pTwkYIXYvNwvhQMWRAqiKYV4=; b=QHGPu/Q5QX+iqHExLCWtwRqT+QAhbgh32zEYlPnqPmMJgI14D1JIwXMiwOscfdeyDb D5rp1JKmzXpcWgEvXYjbTdw1RFG4zhyQnYEmyi4BNb8xsFECRlfXRCfqRCZ0EZ81sEB5 +Nlx5TiGuW61X8TKwDdIVQzoXOyCJQSirLku9clVPZ8LvDQdp/d922a7cftdHxGlxLK6 W3i4y9lU/0sudlFM1utEgb+39EW0kZx9EcnBZd2Y+rKHmV2P2LYptIIo57aIlChtDxs9 vtwSB3Fh6SuvohhyzkqSY0QaZLoKEehABbcwa4RKCiiZaa2ph4xvJDfKTGlDZI2qKnKw zL3g== 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; bh=TrAQWXquXQr9pNczU28pTwkYIXYvNwvhQMWRAqiKYV4=; b=OX8kZKCzcSJ9M6/2KC7i/fGri8a8CboNiRhKag6bXuT0hdK57khp5lPNzSqUJDrFt/ 31uyPbTgWcSBddHsA1rxF3PzJXICotNxC8eU5hp12BhsiWV0EFb8pUBAIRxDscNLdADL Jhu23eapVgf7AeNgJOg3DXhuwPFhqo4iVJJ5J7WybckYYDoQyI0bEhC6JsnnVVOgPC0a QNU85feGkSKiD046q2dsNtbZKouK3APd+u/cfG/0KUsa8lXZjmJYtOq1iyBZI4iaBA0S 0Z315y28rdV66cf3yZ931TNjMTAfdrFKJlx/6aj8P48vWhJvRQW+kIJXAwvJX04QMfwz EXZw== X-Gm-Message-State: ALoCoQndmH7PP0E8XLWxOK2c2TVWfuv+TWQkX9l9FTYRkF0vTtm4E2fTPuRHXEbZ5Zct1TAjD5JL X-Received: by 10.25.16.92 with SMTP id f89mr13325200lfi.1.1445961217660; Tue, 27 Oct 2015 08:53:37 -0700 (PDT) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id r194sm7197111lfg.5.2015.10.27.08.53.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 08:53:36 -0700 (PDT) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Tue, 27 Oct 2015 17:53:30 +0200 Message-Id: <1445961210-13938-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: cpumask: exclude CPU0 from odp_cpumask_default_worker 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" The worker cpu in most cases supposed to be used for one thread. By default all control threads on CPU0, and odp_cpumask_default_control returns it. It shouldn't overlap with worker cpumask. Signed-off-by: Ivan Khoronzhuk --- platform/linux-generic/odp_cpumask_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_cpumask_task.c b/platform/linux-generic/odp_cpumask_task.c index 535891c..227650a 100644 --- a/platform/linux-generic/odp_cpumask_task.c +++ b/platform/linux-generic/odp_cpumask_task.c @@ -33,7 +33,7 @@ int odp_cpumask_default_worker(odp_cpumask_t *mask, int num) num = CPU_COUNT(&cpuset); /* build the mask, allocating down from highest numbered CPU */ - for (cpu = 0, i = CPU_SETSIZE - 1; i >= 0 && cpu < num; --i) { + for (cpu = 0, i = CPU_SETSIZE - 1; i > 0 && cpu < num; --i) { if (CPU_ISSET(i, &cpuset)) { odp_cpumask_set(mask, i); cpu++;