From patchwork Tue Sep 12 16:00:14 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: 112327 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5391026qgf; Tue, 12 Sep 2017 09:03:49 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDtlqBBtUhEJtpjW4WrOHrQmGaMVhnOaaOYiy/gJG4VTDysgRdJ8v8JvJBfa3AStHW9Jl+/ X-Received: by 10.200.56.57 with SMTP id q54mr18705225qtb.310.1505232229057; Tue, 12 Sep 2017 09:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505232229; cv=none; d=google.com; s=arc-20160816; b=XM++ctP3kSRMNekLI0te2VA0mrneJrbRxgVUgHW0sEp3q0yKiNz9o6X2SD45fnac3c 3DmaC4vsl5uEOMSgXMzqKYJP2bP8/FmUIySn0vOhuq+ru6SjTf0oegulOk9M/fBb8G8M NiZMW4FJ8ppBu74mLVG3MutEPxf1pb5rgLrlKuW4ORZLqm47OY5nrU5Ewaq8F50JFZG2 U3EGeTxsWXChWpl9pU3E8p1EOh0x6oPRcW6RVxvBpkVf4ZfhgZdJAWKoH+vsGbHd6+Wl mHNk//3Rylb/1qCkpB7SN5P5p1h2Nr8jgP/eRD6fLMFLloNb9jig8Dnzo63PIhYQwyf5 JvkA== 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=IA/KuYDcUeyehU6hHKHUjsZ6S+tIvgITDjIbglhS/Oc=; b=uDz6OHDX3k0wwt2+5xWzDDZAYTUtDUDMVKQLaXZ3gXmcZX1zZlIps8Z56ma5/+lEpX eArmb9TSGJcnK5SnADgp+GnLopVmQQP1e6r4u0XPPJIp8sbFvrb6yfh6CElvBRWYqWNw 5MS3QQO4cwhg0J/U9HbLDpDrUqar/+GrLyU6dFDRX/MCCSnNwCXHaYsUkLmLPNnDHGM4 sICl/f3Sz3iOW0yhG4UDVa9WgbtD5SBgYc5hdmekKPLsWvPcDd8s8/tWQeHUad1ZMkzF Fpa9/TGDC3yorPmSMvM1HddU1zn+oKJ80AaeAfld1dYJp1jHLPBjsLuAAX2A6TbCatpo x33g== 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 g123si11873916qkd.167.2017.09.12.09.03.39; Tue, 12 Sep 2017 09:03:49 -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 12D4462C62; Tue, 12 Sep 2017 16:03:39 +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 E6E6762AE4; Tue, 12 Sep 2017 16:00:49 +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 0EDD760D92; Tue, 12 Sep 2017 16:00:28 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 03AEC60DB2 for ; Tue, 12 Sep 2017 16:00:21 +0000 (UTC) Received: from mxback7o.mail.yandex.net (mxback7o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::21]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 5E41F40834F0 for ; Tue, 12 Sep 2017 19:00:19 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback7o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IDMaH25gqM-0JNOTGdN; Tue, 12 Sep 2017 19:00:19 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0WCrpZsC8T-0IHiAuoI; Tue, 12 Sep 2017 19: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: Tue, 12 Sep 2017 19:00:14 +0300 Message-Id: <1505232017-2279-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> References: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v8 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 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: 6f2ac07d768416a9261170bb08c4ba53f6d63d4b **/ 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 Tue Sep 12 16:00:15 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: 112324 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp112405edi; Tue, 12 Sep 2017 09:01:21 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCMtqLaff8U+IaUmZhWGx8TqIq26rRsUXLpFoGm5OsHseM8HTKcccY8rhRXAQSvvPnGd4ve X-Received: by 10.55.149.2 with SMTP id x2mr20251318qkd.23.1505232081794; Tue, 12 Sep 2017 09:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505232081; cv=none; d=google.com; s=arc-20160816; b=HFrm7LJusRtjqofcAjN95IdIr7yAdkdXtvCbviOUMHD0BPsnRsfZTsmTWNWNmAu7a6 WtWPpebZM7AL2ftoGgwQ0fd37Wy7elTfDHQSLT7BDeXF7YouM5z4gki92mLprKe495Dy XWSWw2oE/Q5tz9ufuugnoxPyIk8Qk3XN1CBYnhkQAlIQDsHdo8R9qNvG0KvPEopw0Bzi 7U1ACP4xGx34sBFWnywkL78nKOrQvb2PjV0pcRobXeJU09DOckdYY1K0awJrFoyJ4aCW McYY2XYTA0xdEQfMakAwes4e6+J8ldOIKLxY+2oulnbJWvLXU7Qn4QaXtzLpIIQCqhn0 EV4Q== 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=UTSRGb9Y9yUUFbytRlR8aq6Ej1P6r2ARoAPjH7B2FzE=; b=w+lhPTYYX63YiQseiDpfz9XQc9ux/kyRNYLXXfnGPUMd4ewcy8vXMkCZR8kJta2jgw t2gL81AAMWxX2035og5myPKM3mvOckDqPcgMwU1jsnecVhqUB4JegcHBtXoRy8twNBjK dzBOo876y+S9PExrH/z+k5KfWCc9jQEnabyEYdiIwWi2hwBMaUmpND6uImMhXhyld+38 FPas8/k+BCcIYXcWapIigQAsFigwirbPDjosS2IUi35jUSYgHbey3XTSmhMuGooPv9gR 9vbx5tB9NdJCrDFWa6AlNiKYTImJQI5MLNK+sOKRTTEQ2W8Vo0aEZ56T7bm+qzaPWspU hn+g== 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 p23si12353346qkh.251.2017.09.12.09.01.21; Tue, 12 Sep 2017 09:01:21 -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 ECDE860796; Tue, 12 Sep 2017 16:01:20 +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 20FB761235; Tue, 12 Sep 2017 16:00:37 +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 E09F461235; Tue, 12 Sep 2017 16:00:24 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id ABB6C60D92 for ; Tue, 12 Sep 2017 16:00:21 +0000 (UTC) Received: from mxback13j.mail.yandex.net (mxback13j.mail.yandex.net [IPv6:2a02:6b8:0:1619::88]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 34D7B1344454 for ; Tue, 12 Sep 2017 19:00:20 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback13j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7attwW5jzQ-0KgOmwZH; Tue, 12 Sep 2017 19:00:20 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0WCrpZsC8T-0JH8XwPH; Tue, 12 Sep 2017 19: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: Tue, 12 Sep 2017 19:00:15 +0300 Message-Id: <1505232017-2279-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> References: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v8 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 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: 6f2ac07d768416a9261170bb08c4ba53f6d63d4b **/ 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 Tue Sep 12 16:00:16 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: 112325 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5388290qgf; Tue, 12 Sep 2017 09:02:06 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD5ftUpFYMAzy6AgznsGwMN9hLfeY12jwS7K1RNzTIoYsZcXWwavJ8e3X57p7xDsQzV1DsW X-Received: by 10.55.45.199 with SMTP id t190mr5053131qkh.230.1505232125996; Tue, 12 Sep 2017 09:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505232125; cv=none; d=google.com; s=arc-20160816; b=IqbHx7EzF3u6ZRv1Wuy/WeyzyHYX4GPyAM/WzhYiplApxO1Ya4xjlF14MGta3YgNNZ PNVBDJeGTWF6cBATFPZPSSFfp2o6qZBcJnh5KHln8Cg640pQcBjDCkerGWdXgC6ww67T LqZSsqYTjr+zADkMHoE/EApze5VS5kNFKL0X/1CYCZYlOvvb4h9ePYHgfb8mNCn8uk9A XiqZc6NmZtnKnPKuWvMyN1zldRI1laa53jaM0ihmaWCaiuFsQ4nXEK8Glg3UctR7vhCH jTMydTd8uLnK/0ND/u2emq2uvhvPbjtevsr8R7uJ8dJ3RRdqQWsVPiHLq/FQVB3BzUR6 Gwxw== 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=J0cGZsxYt6NlFtYrLXXDBWYf4AWRIRKg2OcZJXEoi/I=; b=Vm8dZOIA9n1bolJ6M0cEcKgQSzmF1h3XmHtI14+/sUiUWWqqx9bqiLBghvOruKH+De pOes6tpirDRE8PXkFi2DG4IQFJ1WnMF0usmN/1TtmSKvo8b7N7/RGQZseb9WVBxU1gkj 08uTqg6l7de3WatTs7cIv4pcLqCUBZdUUrpcYdQb2lPFpDC0X7UGtCFtobS5EaZtm4bc kAdfvwBKWoB67kxdsmM9y817TM744MTysrnzo71KF2DvYW2+wbrVjlz7c9gGujU0fZgF 9/voumakUbS1ztNGZUIbSbXqdHxiI1SmqjXgYG6R1u/xYJXeWOF+0D5ow1Gl38W8j4Bi thdA== 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 h135si12603199qka.285.2017.09.12.09.02.05; Tue, 12 Sep 2017 09:02:05 -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 A94DD61103; Tue, 12 Sep 2017 16:02:05 +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 73D54618C8; Tue, 12 Sep 2017 16:00:40 +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 78FA160D9E; Tue, 12 Sep 2017 16:00:25 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 4411C60F42 for ; Tue, 12 Sep 2017 16:00:22 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward101p.mail.yandex.net (Yandex) with ESMTP id BBB956A83111 for ; Tue, 12 Sep 2017 19:00:20 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id SAxkWdmg5H-0KcqYMKn; Tue, 12 Sep 2017 19:00:20 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0WCrpZsC8T-0KHixGcp; Tue, 12 Sep 2017 19: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: Tue, 12 Sep 2017 19:00:16 +0300 Message-Id: <1505232017-2279-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> References: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v8 3/4] linux-generic: schedule: change 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 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: 6f2ac07d768416a9261170bb08c4ba53f6d63d4b **/ 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 Tue Sep 12 16:00:17 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: 112326 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5389548qgf; Tue, 12 Sep 2017 09:02:52 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBdhvdlPDtfzICT23cQNWGtj9Y3FKH1gkicrcBdjNRwA5v9BCGEK7ekD5QAsjC/mJzqs0Kq X-Received: by 10.237.37.91 with SMTP id w27mr22683504qtc.71.1505232172365; Tue, 12 Sep 2017 09:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505232172; cv=none; d=google.com; s=arc-20160816; b=zTV7wf5xMTiAoFyGd+Ra0Cbh0YvbnTk4B99Y/C3uO6Lr9vu999MJQkTXP3yRAy4yN/ SduDg6czDsi9BXaz4/vvaUDixKWdQymx38seBkhwgQtBxxZCQTV6tmvj6jUVAueduLXJ pDraBrxzFPO/aX0Ps7eK01bKiklJA+V3s5Ou6pArmC0LcwpphqruK6S9y6tnV1Pfvr8q 62PKO2Hc12K9WvnOhAuMDIkeQ6aY8ipL7GOaONKMOxeSfmiFFOb86qJA0/Z2GWG5lWty Wh7t+GRozlXmZyhgtJiX//evOMGnA4vXYaKY94ifafVS+hZ2x+IC/yfZPCZSzaTsSUc9 RJbg== 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=2J4+kzBbnq54c+f+5E3ITWZ9qPsdC7T+vHPJco1Pzig=; b=TQBkBz4ctXY2EnyJcjjg+z1jA9AdSSaFCu9ah1l/pRREn+W4xmmlnbtFIWz58UGmhd zNcf2LKqaXH8R8v/HyHQEwF3ugptE5nVeHztaBwuuhOJOvCsfLeiTm3p+osSVtPFOngZ NYh2sCVgIPMDTq5wLEdKi36fIjQNZV191gE2t98+nZPQw8nTiZVEO2KhJyggLEv8o3wC ooi7VoX2+fKwJEQneIiACXcPV8rulROKJNBBLC7sdNvdMKwOZGtWr7XzKfdzbXVZ19um xV1A+JwhpgKXoL7kekxXmtRaSI7eQOYxD6YG//hQPFzjx7dhEL6d8xxwDqgwtnG1LvSj Wf/g== 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 t204si12209690qke.42.2017.09.12.09.02.52; Tue, 12 Sep 2017 09:02:52 -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 E54AC61E1A; Tue, 12 Sep 2017 16:02:51 +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 9BC28622F0; Tue, 12 Sep 2017 16: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 A4DA560D9E; Tue, 12 Sep 2017 16:00:26 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id A0E1561103 for ; Tue, 12 Sep 2017 16:00:22 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 96E8B1344419 for ; Tue, 12 Sep 2017 19:00:21 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Ze98CsbkRr-0LVuD1Nu; Tue, 12 Sep 2017 19:00:21 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0WCrpZsC8T-0KH84EDL; Tue, 12 Sep 2017 19:00:21 +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: Tue, 12 Sep 2017 19:00:17 +0300 Message-Id: <1505232017-2279-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> References: <1505232017-2279-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v8 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: 6f2ac07d768416a9261170bb08c4ba53f6d63d4b **/ 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 };