From patchwork Sun Aug 9 01:55:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 52072 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 3367C20539 for ; Sun, 9 Aug 2015 01:59:04 +0000 (UTC) Received: by lbbnr7 with SMTP id nr7sf44553991lbb.2 for ; Sat, 08 Aug 2015 18:59:03 -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:in-reply-to:references: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=X4BF3ZvSwK6NY9WfiAI3dqeDxV3LI8UOORZgnxMbxhY=; b=WFoSm7UWo9r2PKbexq0u8ecakKtIbXmHbmcRzqzrBWSRYd4kDptl19EgBvK3MRz45H fTLsfVBmiijRqALh3VifQ2Ee47x8Us89PDlwBjZCn9XdWuiHpCS7GaGX9F0FP1+CnQWG 11wtFI7ZQhvQdKbB1mrb1+N3pJ/xzttECuwAYVR5o5x8Hsw3QBo+RLlYuRhrnKQQQcLS 6cWC38AhDwVmTuVfsZEeIdEOomMQhZI863P3QeCgJtKU+lPIDfK4Cn+JF/+VU/stDcN1 GonDOyTQE1k+v5mcgrjVA0as5SVPr4cKErIL//ypDyft8tzqZZ9LVNMxjtf4UA7THKye 2CEQ== X-Gm-Message-State: ALoCoQk/zVzHm/+w3qTM1pVCbtUFI+K3CzsXX5lvl8Es/6ysXS9MkLosAESPbspomsiQLo1Zd60+ X-Received: by 10.152.9.99 with SMTP id y3mr4292042laa.10.1439085543125; Sat, 08 Aug 2015 18:59:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.164 with SMTP id az4ls442738lab.81.gmail; Sat, 08 Aug 2015 18:59:02 -0700 (PDT) X-Received: by 10.152.4.98 with SMTP id j2mr14386705laj.67.1439085542716; Sat, 08 Aug 2015 18:59:02 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id dl8si11195363lad.72.2015.08.08.18.59.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Aug 2015 18:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbtg9 with SMTP id tg9so40825246lbb.1 for ; Sat, 08 Aug 2015 18:59:02 -0700 (PDT) X-Received: by 10.152.28.193 with SMTP id d1mr1032910lah.72.1439085542503; Sat, 08 Aug 2015 18:59:02 -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.7.198 with SMTP id l6csp1187484lba; Sat, 8 Aug 2015 18:59:01 -0700 (PDT) X-Received: by 10.107.19.32 with SMTP id b32mr14547796ioj.144.1439085540477; Sat, 08 Aug 2015 18:59:00 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 196si11762548iof.67.2015.08.08.18.58.59; Sat, 08 Aug 2015 18:59:00 -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 87F5761EDB; Sun, 9 Aug 2015 01:58:59 +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 1062461F0C; Sun, 9 Aug 2015 01:56:46 +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 1DA4061E06; Sun, 9 Aug 2015 01:55:27 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by lists.linaro.org (Postfix) with ESMTPS id E7D6A61DC9 for ; Sun, 9 Aug 2015 01:55:24 +0000 (UTC) Received: by obbfr1 with SMTP id fr1so65969769obb.1 for ; Sat, 08 Aug 2015 18:55:24 -0700 (PDT) X-Received: by 10.60.74.103 with SMTP id s7mr4809310oev.86.1439085324407; Sat, 08 Aug 2015 18:55:24 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id d184sm9449191oif.9.2015.08.08.18.55.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Aug 2015 18:55:23 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sat, 8 Aug 2015 20:55:05 -0500 Message-Id: <1439085315-6957-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439085315-6957-1-git-send-email-bill.fischofer@linaro.org> References: <1439085315-6957-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv11 03/13] api: schedule: revised definition of odp_schedule_release_ordered 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: bill.fischofer@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.217.180 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 Change the signature of odp_schedule_release_ordered() to add an event parameter to specify the event whose order is to be released. This is needed because odp_schedule_multi() may return multiple events. Signed-off-by: Bill Fischofer --- include/odp/api/schedule.h | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index bd858b3..f27bf78 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -147,21 +147,31 @@ void odp_schedule_resume(void); void odp_schedule_release_atomic(void); /** - * Release the current ordered context - * - * This call is valid only for source queues with ordered synchronization. It - * hints the scheduler that the user has done all enqueues that need to maintain - * event order in the current ordered context. The scheduler is allowed to - * release the ordered context of this thread and avoid reordering any following - * enqueues. However, the context may be still held until the next - * odp_schedule() or odp_schedule_multi() call - this call allows but does not - * force the scheduler to release the context early. - * - * Early ordered context release may increase parallelism and thus system - * performance, since scheduler may start reordering events sooner than the next - * schedule call. + * Release a specified event in the current ordered context. + * + * This call tells the scheduler that the current ordered context no longer + * needs to be maintained for the specified event. This call is needed if, for + * example, the caller will free or otherwise dispose of an event that came + * from an ordered queue without enqueuing it to another queue. This call does + * not effect the ordering associated with any other event held by the caller. + * + * Releasing order may increase parallelism and thus system performance, since + * the scheduler may start resolving reordered events sooner than the next + * odp_queue_enq() call. + * + * @param ev The event to be released from the current ordered context. + * + * @retval 0 Success. Upon return ev behaves as if it originated + * from a parallel rather than an ordered queue. + * + * @retval <0 Failure. This can occur if the event did not originate + * from an ordered queue (caller error) or the implementation + * is unable to release order at this time. In this case, + * the caller must not dispose of ev without enqueing it + * first to avoid deadlocking other events originating from + * ev's ordered queue. */ -void odp_schedule_release_ordered(void); +int odp_schedule_release_ordered(odp_event_t ev); /** * Prefetch events for next schedule call