From patchwork Mon Jun 29 16:09:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 50437 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E6DC1218E4 for ; Mon, 29 Jun 2015 16:09:38 +0000 (UTC) Received: by wgbbj7 with SMTP id bj7sf48697308wgb.2 for ; Mon, 29 Jun 2015 09:09:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=pBE89dwhAs1Dm6U5aBh6BDuD7L/7oBYTVB4vPoPrpQU=; b=foFIws4tXJs+rb1YmeOGKtIu1dNrpYxsM6kldMHkGgkZC8oddM6bo4BOxaP/CCE/K7 6i8S5kz/0Xhe2srdcy3NzsTgDu15xGN/MGGHhgaSQAQdmRXqxL3J5D2yT3w4F7QwCcpH nfgVtYfaRfcJWqelioc12+QOFw9S+1glOUIjJRGAGLRdvyvYFEQWwOCfSNEkx+pTBSqP 5TR+igpmIHLKBD4fyZgmOZSNKMc2ZKQulDbWPXkSb+eXTv1a0Wx1TZH4u8zXyNMle60I RCx9o3yIpQG+E7bl4J31VHzkidc1c27Y6x6yy4mKVAw/+7Fc6U7ZQECbcwrIKD5oyL1j 3+/Q== X-Gm-Message-State: ALoCoQnPKZhlUZMsC9HUJCHgFsBlUpot4L456EurIdJ/h00MxFWWsfihdJdBXb+35W/qBa+qZ9OA X-Received: by 10.195.18.70 with SMTP id gk6mr9848600wjd.6.1435594178245; Mon, 29 Jun 2015 09:09:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.133 with SMTP id y5ls801760laj.19.gmail; Mon, 29 Jun 2015 09:09:37 -0700 (PDT) X-Received: by 10.152.7.65 with SMTP id h1mr14920886laa.33.1435594177951; Mon, 29 Jun 2015 09:09:37 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id p6si20327512laj.67.2015.06.29.09.09.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2015 09:09:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagx9 with SMTP id x9so131546575lag.1 for ; Mon, 29 Jun 2015 09:09:37 -0700 (PDT) X-Received: by 10.112.234.200 with SMTP id ug8mr14770692lbc.117.1435594177722; Mon, 29 Jun 2015 09:09:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1809475lbb; Mon, 29 Jun 2015 09:09:36 -0700 (PDT) X-Received: by 10.55.41.95 with SMTP id p92mr33101686qkh.10.1435594176452; Mon, 29 Jun 2015 09:09:36 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f93si42209048qkh.64.2015.06.29.09.09.35; Mon, 29 Jun 2015 09:09:36 -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; Received: by lists.linaro.org (Postfix, from userid 109) id AF93861DFD; Mon, 29 Jun 2015 16:09:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3879061B5D; Mon, 29 Jun 2015 16:09:32 +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 A81FE61DC5; Mon, 29 Jun 2015 16:09:30 +0000 (UTC) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by lists.linaro.org (Postfix) with ESMTPS id 8A20C61B5D for ; Mon, 29 Jun 2015 16:09:29 +0000 (UTC) Received: by wgjx7 with SMTP id x7so72135960wgj.2 for ; Mon, 29 Jun 2015 09:09:28 -0700 (PDT) X-Received: by 10.194.174.194 with SMTP id bu2mr32494371wjc.76.1435594168553; Mon, 29 Jun 2015 09:09:28 -0700 (PDT) Received: from localhost.localdomain ([87.120.178.39]) by mx.google.com with ESMTPSA id lj14sm12796237wic.18.2015.06.29.09.09.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jun 2015 09:09:27 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 29 Jun 2015 19:09:18 +0300 Message-Id: <1435594158-11370-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] validation: scheduler run cpu_num - 1 worker threads X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Use first cpu as control thread to run workers. And all other cpus for workers run with pthread_create. If needed to run something on current core it has to be run directly, not with pthread_create. Signed-off-by: Maxim Uvarov --- test/validation/odp_scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/validation/odp_scheduler.c b/test/validation/odp_scheduler.c index c2eb996..fc96d90 100644 --- a/test/validation/odp_scheduler.c +++ b/test/validation/odp_scheduler.c @@ -683,7 +683,9 @@ static int schd_suite_init(void) memset(globals, 0, sizeof(test_globals_t)); - globals->cpu_count = odp_cpu_count(); + /* Use current cpu as control thread and run workers + * on all others cpu.*/ + globals->cpu_count = odp_cpu_count() - 1; if (globals->cpu_count > MAX_WORKERS) globals->cpu_count = MAX_WORKERS;