From patchwork Mon Feb 5 16:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 126910 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2091139ljc; Mon, 5 Feb 2018 08:01:35 -0800 (PST) X-Google-Smtp-Source: AH8x226ryq/buXvBG05LvwxbNfEGjdjPyoHjgyB+ubFpQdiYkxW28aSVoYhav9sLniY1QYRidK1N X-Received: by 10.237.63.165 with SMTP id s34mr81017212qth.312.1517846495627; Mon, 05 Feb 2018 08:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517846495; cv=none; d=google.com; s=arc-20160816; b=bWeLPJSYokyYoMdVR0yQlQbkoCVmzsgkd9ziBhWvwrTaiSC2l1vvT+msyygkr+E3JA xORls/fdEox842NziycqEoV1eSGucKrj+bIjbEjA6R6DMUdUoR0hRDezZyyvL19NkFdc ynIlPEhiF2I2CitzvXavx1F/GNC8dnMWzYoO0lAOK11IOvva1V7qG8CX3E2fbaNQUZvN 4IcuZSVhxLR7Tp0IuZ53sUsw2ExabB19YcZECTFNLizja/WbYfEZNuzkQsnRnlvsrevU tpMhTD29jKSK/OyuSfPa5fe+a8S8NBE2KglWr9S08ZCBC64YznLamNkpILOlmArLVxiR g8qg== 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=Hx2HaO1aSJmxQydwM0ZEZt+kY9a6rriCgDAFlciPj90=; b=ofnDRLKY6pW9q19FN+2UcmKoL9V7XONVVDaJOjAO8fqWaBQ2xFd8BxXi9NDxxTxatx lnO35cLJoRbDj3SeERPulKEZmIwYCJrb7n3WMoMS21Md1BpwZ0QV7B5NTk50ZRlsaY2T xzOm/AWlkpcdIGcqCM6Vm8J7vTV08+WscHuW/PEkX32tcrEpe/XnI+lbjgeJ0K/0Q0r6 yiGOhem7x7mbI03YZmzrNG4KZCS4KlsXFAVeJn/78f95RHaTHggpUPFNJtAtIeXxCX9K 5BM7kQdaGNykEh42604mHMn/AChgqV9PG6/febWz+MxhPVO+ImYAFTJhh+YyEgK/fPTz 21iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id o64si124805qte.77.2018.02.05.08.01.35; Mon, 05 Feb 2018 08:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 45CAE619C0; Mon, 5 Feb 2018 16:01:35 +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, RCVD_IN_MSPIKE_H2 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 3A8B36068C; Mon, 5 Feb 2018 16:00:30 +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 5EC5260881; Mon, 5 Feb 2018 16:00:19 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 9C7746068C for ; Mon, 5 Feb 2018 16:00:12 +0000 (UTC) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 1FE9F2A22421 for ; Mon, 5 Feb 2018 19:00:11 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id RJy4QceqM9-0BDmbrnx; Mon, 05 Feb 2018 19:00:11 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8Xr539C9Ni-0ANKY1Rf; Mon, 05 Feb 2018 19:00:10 +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: Mon, 5 Feb 2018 19:00:08 +0300 Message-Id: <1517846409-7604-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517846409-7604-1-git-send-email-odpbot@yandex.ru> References: <1517846409-7604-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 453 Subject: [lng-odp] [PATCH API-NEXT v2 1/2] api: schedule: add asynchronous order 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 add asynchronous order lock api. schedule order context lock can be acquired asynchronously using two functions start and wait. application can utilize the cycles between these functions to increase performance. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 453 (bala-manoharan:async_order_lock) ** https://github.com/Linaro/odp/pull/453 ** Patch: https://github.com/Linaro/odp/pull/453.patch ** Base sha: fa6d104f6031b9687ae5f60f87f5c2338ad9a83e ** Merge commit sha: a50f50ab2e9af13052f4d9dc7d962b8c0c111868 **/ include/odp/api/spec/schedule.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index d493cc75f..ef8de9415 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -371,6 +371,30 @@ void odp_schedule_order_unlock(uint32_t lock_index); */ void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); +/** Asynchronous ordered context lock + * Request an ordered context lock to be acquired. Starts to acquire an ordered + * context lock does not wait until the lock has been acquired. Application can + * use this call to potentially interleave some processing within waiting for + * this lock. Each start lock call must be paired with a wait call that blocks + * until the lock has been acquired. Locks cannot be acquired in nested fashion + * i.e each start call must follow a paring wait call before the next ordered + * context lock call (both sync and async). + * The same constraints apply as with odp_schedule_order_lock() + * + * @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_start(uint32_t lock_index); + +/** Asynchronous ordered context lock wait + * wait for a previously started lock acquire operation to finish. + * Lock index must match with the previous start call. Ordered lock acquisition + * will be completed during this call. + */ +void odp_schedule_order_lock_wait(uint32_t lock_index); + /** * @} */