From patchwork Wed Sep 13 08:00:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112408 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp661528qgf; Wed, 13 Sep 2017 01:02:04 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCtniJXoHI6eVkCXcoV76O8xnNCW5j6QoJ0EHGZXm2rccMuVzDC/8FvfqFn/9u5Z0hG76vK X-Received: by 10.55.167.197 with SMTP id q188mr22436193qke.234.1505289724204; Wed, 13 Sep 2017 01:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505289724; cv=none; d=google.com; s=arc-20160816; b=gxOOYxvtDIS1oKjgVZZ9a2nwawndO55pYxj163LQpESV4Tsr66hIChNx6GpCVmX2tC lzKF7gjuu0nJExMhgXYh8hSgfjZ3JzntnDD4GQ1L2ebujwzPzUuEHCJbZedzQGUXe8f9 MuyxNz+zMfFoimfAxPZqmltkalmkVW9o+u5V+U3BqiLJ9X2svDmKyM77LwR8UQi/D5Zi 3TYCj+acnWWJTyX1SuePbFDjchcqWDV1dOSjIc0l1Qxo5JbvDBdc7nS82dC0xuU7xdJN BKQxVlmydgjtZHVTlt/gfXOLMbsaVvR7VvbJqrlN8POJ/k3njj9j0RRp+wLny/fYL/K7 yZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=6cKXPj3vjGBAEvFvolctJbnntOL9ugjh2U8udwImAjY=; b=pCub9NgobXJezm+OqeRPI8JSS7h3SVVx2sIjOJHbRw+EO4xj7eXFWa3zOGD3gJ4JkY W2Z8wk1ycFZJ0y9ExT0vBKcS10Ua9MEmpsgabcDr+aXHxqFSHwVbrQGIIic3xhJX892z KRTUW5G9hV0Xa1iHAmRD94ZOtKyJUx2kaNbeLtgfB7Xr40Shd0v1754tQ4CLA4n/g+MR kaknmvYaNW+QIMj+W0pJuDuDPcQCFKmPQAraEaOYB4NHXc0rkViiDxd0adCUKEsMMlX+ GNMAeqyBu5Vab749e4spk/BnWCBvXUxUbmbp8tLsuLN//vQYkPMxnIU4yaG77kzObyLV FzCA== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d24si12477729qtf.414.2017.09.13.01.02.02; Wed, 13 Sep 2017 01:02:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id C5FC060D25; Wed, 13 Sep 2017 08:02: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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 1E8D760D89; Wed, 13 Sep 2017 08:00:47 +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 05E6A60D78; Wed, 13 Sep 2017 08:00:44 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id CE43460D89 for ; Wed, 13 Sep 2017 08:00:20 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 4C2D0181479 for ; Wed, 13 Sep 2017 11:00:19 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id sKKuaqDNMP-0JfCsSeE; Wed, 13 Sep 2017 11:00:19 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uyUnrk7AGm-0Iu8Xo8L; Wed, 13 Sep 2017 11:00:18 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 13 Sep 2017 11:00:10 +0300 Message-Id: <1505289613-14489-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> References: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v9 1/4] api: schedule: remove support for nested ordered lock 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balasubramanian Manoharan removes support for nested ordered lock use-case changes function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 9d7a98815f8025c2e47e0f4b5222a59feb4e7554 **/ include/odp/api/spec/schedule.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index 8244746d..e2abf990 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -347,12 +347,15 @@ int odp_schedule_group_info(odp_schedule_group_t group, * be protected by its own ordered lock. This promotes maximum parallelism by * allowing order to maintained on a more granular basis. If an ordered lock * is used multiple times in the same ordered context results are undefined. + * Only one ordered lock can be active in an ordered context at any given time. + * Results are undefined when multiple ordered locks are acquired in nested + * fashion within the same ordered context. * * @param lock_index Index of the ordered lock in the current context to be * acquired. Must be in the range 0..odp_queue_lock_count() * - 1 */ -void odp_schedule_order_lock(unsigned lock_index); +void odp_schedule_order_lock(uint32_t lock_index); /** * Release ordered context lock @@ -365,7 +368,7 @@ void odp_schedule_order_lock(unsigned lock_index); * hold this lock. Must be in the range * 0..odp_queue_lock_count() - 1 */ -void odp_schedule_order_unlock(unsigned lock_index); +void odp_schedule_order_unlock(uint32_t lock_index); /** * @} From patchwork Wed Sep 13 08:00:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112409 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp662297qgf; Wed, 13 Sep 2017 01:02:55 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC/4vXqohKtYtZwIQcU5BJqLvw7YZkm70htUmKDJQkCQ7TeQEiw7rJa1YjMe6014n9Ja9Va X-Received: by 10.237.52.68 with SMTP id w62mr5443533qtd.217.1505289775341; Wed, 13 Sep 2017 01:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505289775; cv=none; d=google.com; s=arc-20160816; b=O9iyop0ArPUj6N05joddynmFDnUtFteSzDX60D06BRjtU0kzFuRNOJhphSysd8IDdq dgiKc4yJcCF0TXQGRpbtuTdL++K9VzUJF5xnRbizSN+QBTpZr13/f8WZpaizHuSuTWKz Z8/Urf8JE/TaCh7zNgLG63c/qPMYL1R2FPYQHJCCyvhPuFTbNYjlF2eRzZZz7/lCcELF ziqVbRBAgxKNVpGysrOPoR4uNWOSvSUTr2btc/bzgNj7dMS5M4Ycltm/IxsQvQmsOa9R OC98YmQKP9kNqVjJbOqJQ5EyMxZF3EKid9bq6DW76Yr6QxxvS3AJScF+PnwDMl71+eiB xG8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=SCiNA96nsO/1TxRm5sLVUBZedhbyPQwUfZdD49WiaEg=; b=vVwggd6bz3g+ygeS25X8JRT+trnfe5YW8YZhcEKzvSWWVN8y+KzxnvIsbKSg8miUdG 4MBcvQ1fX2h20kqjGdWj2F2wkELI4BBhC4UN3dA3sLq/R0qwnggzc2T41C5kza7w6Vq2 k2YXXxlk7mB71rxFWjpGoVv3Tqn9lYz9f+ziIpix8qklo4U1bXPrHlgmkeXIZCNcIRdK oGllhW/eYgHwPVl8qS7KWGQYlAjZImhdmCDPqS1A/HegdcA9aiW0P0SSLiYyvWi0Pjry 2XJ27k/2SY4xYbF+DLcZsUeffcN8bfL2i833gbNjzTdwXlMABJMysEas+s/5fuvg6RK2 lCBQ== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 72si1792407qks.371.2017.09.13.01.02.55; Wed, 13 Sep 2017 01:02:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id F231560D9E; Wed, 13 Sep 2017 08:02:54 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 390BE60C63; Wed, 13 Sep 2017 08:01:07 +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 14FB361C9E; Wed, 13 Sep 2017 08:00:53 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id 5469461057 for ; Wed, 13 Sep 2017 08:00:21 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward105o.mail.yandex.net (Yandex) with ESMTP id CDEBE4444FD5 for ; Wed, 13 Sep 2017 11:00:19 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qJCShgViXx-0JVWRFGB; Wed, 13 Sep 2017 11:00:19 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uyUnrk7AGm-0Ju8iuDs; Wed, 13 Sep 2017 11:00:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 13 Sep 2017 11:00:11 +0300 Message-Id: <1505289613-14489-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> References: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v9 2/4] api: schedule: add schedule order unlock lock api 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balasubramanian Manoharan Adds odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 9d7a98815f8025c2e47e0f4b5222a59feb4e7554 **/ include/odp/api/spec/schedule.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index e2abf990..d305ce3b 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -371,6 +371,31 @@ void odp_schedule_order_lock(uint32_t lock_index); void odp_schedule_order_unlock(uint32_t lock_index); /** + * Release existing ordered context lock and acquire a new lock + * + * This call is valid only when holding an ordered synchronization context. + * Release a previously locked ordered context lock and acquire a new ordered + * context lock. This call is valid only when there is a single ordered context + * lock active. Results are undefined if this call is made when multiple ordered + * context locks are acquired in nested fashion. + * This call does not release the existing ordered context and only switches + * from one ordered lock to another ordered lock within the same ordered + * context. + * + * @param unlock_index Index of the acquired ordered lock in the current + * context to be released. Results are undefined if the + * ordered lock with the given unlock_index is not held by + * this ordered context. + * @param lock_index Index of the ordered lock in the current context to be + * acquired. Previously acquired ordered lock is released. + * Must be in the range 0...odp_queue_lock_count() - 1. + * + * @see odp_schedule_order_lock(), odp_schedule_order_unlock() + * + */ +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); + +/** * @} */ From patchwork Wed Sep 13 08:00:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112410 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp662999qgf; Wed, 13 Sep 2017 01:03:44 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDXiwr/JcubKaqlE3gVc7dEPBCNxJNsJ/DlPv9rpkBv4yYwvenmOd2unDWkcAGYwZY9gFTa X-Received: by 10.200.40.20 with SMTP id 20mr23725829qtq.324.1505289824196; Wed, 13 Sep 2017 01:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505289824; cv=none; d=google.com; s=arc-20160816; b=gsFqeaMjaoCULrlgM/q67Bc6mO1Uzq4nK0+f8nL/TLad/5DFVmbBKFz9n+WhovrU+8 X3EZyUVp8ffvjiNGE0qiWorxw0qxkVb2blEsMnHCS4ixwIBfGC0uAotfA8yFOpg5ldtp hHpb6nsn3wYuOrecS2emL0SrW+DjOyaorxIp1uzwOlE/kJhuOXdw/1+sDx6OOu+eq2Kc XdBosCFqpuHpED61BRWeqSSULB2a/NhUNSrTl/H6g02jtCRbdPUPvHQWAUR5Peyx6Pdg 7hqtGeDR6W7Y1spalRcdoNymRjbk9pGHZEVFT3gY/ZHTUKDWeM/E/gr5B25ZNknyGbPl 8jlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=B1wupqDuxcoCSTHFE+WUGd7Duy7Q2GrQ5QLT2BnSdLk=; b=K2Hd7JWilqGUs520dcUfC4TfarMb6U4BT9uWCjcD48j63yr+0BzTWyaMqkKEzJTxsA RYRMoIdINnYjiHsuqdygd9ZhttQJBRg9TQbe26q/rC6QPZzHXCtVPoBQdcUcxpibtz3z IRMiuCB+Oa+OPzb6Ev033ju9ODFcKTUUmKkmkO5uHayS9D4nYt/FiDYBi1sumgkfODqC 9wV/ygxWVqZfHu0I4x8qmmqui9PL2LP6YykjmTgCx9bhzY+smTPGzS24eDAQWV30599d DJ8GEHGN6J0Mf07mTykK8GE76yCc4fcnbAQ4bIOjVcnDvFUbpgPKKWWW8PMFE4TzXNzl jrUw== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k4si13594171qkd.430.2017.09.13.01.03.43; Wed, 13 Sep 2017 01:03:44 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id CCA5561C9E; Wed, 13 Sep 2017 08:03:43 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 84E4F6156C; Wed, 13 Sep 2017 08:01:14 +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 7E50D61057; Wed, 13 Sep 2017 08:00:56 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id BDA7C61613 for ; Wed, 13 Sep 2017 08:00:21 +0000 (UTC) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 87848445F0 for ; Wed, 13 Sep 2017 11:00:20 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id AtRVSGCpLL-0KD0jWBq; Wed, 13 Sep 2017 11:00:20 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uyUnrk7AGm-0JuKE9vQ; Wed, 13 Sep 2017 11:00:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 13 Sep 2017 11:00:12 +0300 Message-Id: <1505289613-14489-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> References: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v9 3/4] linux-generic: schedule: change order lock function signature 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balasubramanian Manoharan change function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 9d7a98815f8025c2e47e0f4b5222a59feb4e7554 **/ platform/linux-generic/odp_schedule.c | 4 ++-- platform/linux-generic/odp_schedule_if.c | 4 ++-- platform/linux-generic/odp_schedule_iquery.c | 4 ++-- platform/linux-generic/odp_schedule_scalable.c | 4 ++-- platform/linux-generic/odp_schedule_sp.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 5b940762..7040e3c4 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -1100,7 +1100,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1127,7 +1127,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index e56e3722..ff664420 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -120,12 +120,12 @@ int odp_schedule_group_info(odp_schedule_group_t group, return sched_api->schedule_group_info(group, info); } -void odp_schedule_order_lock(unsigned lock_index) +void odp_schedule_order_lock(uint32_t lock_index) { return sched_api->schedule_order_lock(lock_index); } -void odp_schedule_order_unlock(unsigned lock_index) +void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index b81e5dab..f720a48b 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1252,7 +1252,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1279,7 +1279,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 765326e8..d08c4611 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -990,7 +990,7 @@ static int _schedule(odp_queue_t *from, odp_event_t ev[], int num_evts) /******************************************************************************/ -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { struct reorder_context *rctx = sched_ts->rctx; @@ -1010,7 +1010,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { struct reorder_context *rctx; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 05241275..10da80e3 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -809,12 +809,12 @@ static int schedule_group_info(odp_schedule_group_t group, return 0; } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { (void)lock_index; } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { (void)lock_index; } From patchwork Wed Sep 13 08:00:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112411 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp663776qgf; Wed, 13 Sep 2017 01:04:30 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCpF5GArJ/Z2Oow+C2RSfBG/OWXdQgegPHTrm2d15x0J7JuxXznGpfS+dtlpzjEcCU7tpe6 X-Received: by 10.200.9.66 with SMTP id z2mr12102490qth.254.1505289870081; Wed, 13 Sep 2017 01:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505289870; cv=none; d=google.com; s=arc-20160816; b=Bv/588Niev0Ev9XMUNY5WNH+8CCe45N7mv5LRAi5sLLrdCk20IFkimt3MwtYVGmC3A hVEt37DPz7RNhAyn2iVodkrI0fq6c6SRi/WU0lBQhqYphJ45g9BlCYClheSpXlqX0cIp M3RRwZRmwIG6Vc0pKa5zIG07JFS9YHuVRs+SLvzdfx9q4dekuklVP2pTrko/JhSeSLr6 WzAYFPvvXr4AQrpq2I9Ck5nMoGMQOUAvjK9P3VZXgWlOYoCbT0cRieG0zr1AMU+QXmah PBuC6STohx+OLvduy+3cKlPLKMITVG7DyrDQKHvl3Q88upGWU+mh6HnvcHTrlscOzmJk Ne2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=jYntwvu2aSa+FNwAOeGu+D3z9GXuD5q2zWc6BNDNi4U=; b=wivShXZpR1tiiE1Wbx/6lW0FKo81zCQY5SPwOljExj7lR9QyYQPspAPcQyNjS3gs3a ViK1A958qBLjEK8fECNrdxBSRM8cEcW+s6VhOvwAF8lCRUUMkl+OWxAN2VCvJhAWW4iu iv6SqxLI1vUdqxFaBe7FZbhvL0EXgp6Q8AQmgHU3ZOlfGB2L/DS8/n2ZCL2kqyJDl4b0 dwC2u2Ml4TYL3TxxBpQ2pyvFvpBuE/fzJD2RRwyOhfmqgdA9ya0H6I4qUOyoKlIT5RB+ eKXTKBpdLvjxqSjEd9ow3zI6fnj53nTAZbmwdtYz5m0Xu6MjaA5KKkS/avkQZ4AwEdsp gHSQ== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y2si13814313qkc.14.2017.09.13.01.04.29; Wed, 13 Sep 2017 01:04:30 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A7D6F62C5C; Wed, 13 Sep 2017 08:04:29 +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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 41511609D6; Wed, 13 Sep 2017 08:01:18 +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 D8B5560D7A; Wed, 13 Sep 2017 08:00:59 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id C1D2661BC5 for ; Wed, 13 Sep 2017 08:00:22 +0000 (UTC) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 67D9243038B8 for ; Wed, 13 Sep 2017 11:00:21 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XEuOU6umr3-0L4OkHQh; Wed, 13 Sep 2017 11:00:21 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uyUnrk7AGm-0KuWpngG; Wed, 13 Sep 2017 11:00:20 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 13 Sep 2017 11:00:13 +0300 Message-Id: <1505289613-14489-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> References: <1505289613-14489-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v9 4/4] linux-generic: schedule: implement schedule order unlock lock api 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balasubramanian Manoharan Implements odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 9d7a98815f8025c2e47e0f4b5222a59feb4e7554 **/ platform/linux-generic/include/odp_schedule_if.h | 1 + platform/linux-generic/odp_schedule.c | 10 +++++++++- platform/linux-generic/odp_schedule_if.c | 5 +++++ platform/linux-generic/odp_schedule_iquery.c | 10 +++++++++- platform/linux-generic/odp_schedule_scalable.c | 8 ++++++++ platform/linux-generic/odp_schedule_sp.c | 10 +++++++++- 6 files changed, 41 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 657993b1..bf999adf 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -95,6 +95,7 @@ typedef struct { odp_schedule_group_info_t *); void (*schedule_order_lock)(unsigned); void (*schedule_order_unlock)(unsigned); + void (*schedule_order_unlock_lock)(uint32_t, uint32_t); } schedule_api_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 7040e3c4..597e561f 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -1144,6 +1144,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, sched_local.ordered.ctx + 1); } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_pause(void) { sched_local.pause = 1; @@ -1429,5 +1436,6 @@ const schedule_api_t schedule_default_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index ff664420..08ca813a 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -129,3 +129,8 @@ void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } + +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index) +{ + sched_api->schedule_order_unlock_lock(unlock_index, lock_index); +} diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index f720a48b..ba81b46d 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1296,6 +1296,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static unsigned schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; @@ -1368,7 +1375,8 @@ const schedule_api_t schedule_iquery_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; static void thread_set_interest(sched_thread_local_t *thread, diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index d08c4611..100cb0b2 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -1028,6 +1028,13 @@ static void schedule_order_unlock(uint32_t lock_index) rctx->olock_flags |= 1U << lock_index; } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_release_atomic(void) { sched_scalable_thread_state_t *ts; @@ -1978,4 +1985,5 @@ const schedule_api_t schedule_scalable_api = { .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock, }; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 10da80e3..11d2a1f7 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -819,6 +819,13 @@ static void schedule_order_unlock(uint32_t lock_index) (void)lock_index; } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + (void)unlock_index; + (void)lock_index; +} + static void order_lock(void) { } @@ -868,5 +875,6 @@ const schedule_api_t schedule_sp_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock };