From patchwork Fri Jul 31 02:41:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51735 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id EB3C122A24 for ; Fri, 31 Jul 2015 02:45:16 +0000 (UTC) Received: by labby2 with SMTP id by2sf659905lab.3 for ; Thu, 30 Jul 2015 19:45:15 -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=VgvUkst3NIUWauUESLttfftu5rqfqU+FJ2gY1ie2iok=; b=BfqxnGzC8u/MtPmXvyWrmcp5fQj+1Y3436SB5s4lQbrjKcTQirGQGdmKU5pUldiI0l hOG3C8tmiV0RvfXLIwDgAx/HpZCwhtoiYuPvwLhhVVJv/NZqOF/uvHMUxOgM4joBNFa7 WCkMY0Chzqogz8d0PxVxNkyys+v656FAaQ/3dvLNft/ehvFVY7JlOd9J1tKmwiprkDbT Q2YXoW4DucS6vkb4wRtP70Ln1JZUOY2Cl8tnx6WwhiLH2mFF+/EEHhBdfy2UtRoQJ+g0 vw5dpiiR/JUkHivjrGbAP/HzgJZUZ78tHkcW6VpXTGw8qulBvs6itcjqUJEG+EMATgfC eiJA== X-Gm-Message-State: ALoCoQmz1sNa80s5GjHOEq/V0KHMon2F/pajsWTERH0GqK+eqyheGPOvgSoxYsX3YknbJ2x/hpju X-Received: by 10.180.11.226 with SMTP id t2mr293827wib.0.1438310715889; Thu, 30 Jul 2015 19:45:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.227 with SMTP id z3ls213523lad.97.gmail; Thu, 30 Jul 2015 19:45:15 -0700 (PDT) X-Received: by 10.112.85.204 with SMTP id j12mr398475lbz.47.1438310715655; Thu, 30 Jul 2015 19:45:15 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id cy1si2331466lac.38.2015.07.30.19.45.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 19:45:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbqc9 with SMTP id c9so12930179lbq.1 for ; Thu, 30 Jul 2015 19:45:15 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr415052lbc.19.1438310715521; Thu, 30 Jul 2015 19:45:15 -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 l6csp100838lba; Thu, 30 Jul 2015 19:45:14 -0700 (PDT) X-Received: by 10.55.51.149 with SMTP id z143mr743147qkz.34.1438310714060; Thu, 30 Jul 2015 19:45:14 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m74si3884321qhb.85.2015.07.30.19.45.13; Thu, 30 Jul 2015 19:45:14 -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 61ED0620C0; Fri, 31 Jul 2015 02:45:13 +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 5CF0F620E0; Fri, 31 Jul 2015 02:42:44 +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 72A5F620D9; Fri, 31 Jul 2015 02:42:36 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by lists.linaro.org (Postfix) with ESMTPS id A0CC7620D7 for ; Fri, 31 Jul 2015 02:42:04 +0000 (UTC) Received: by pacan13 with SMTP id an13so33360070pac.1 for ; Thu, 30 Jul 2015 19:42:04 -0700 (PDT) X-Received: by 10.67.5.231 with SMTP id cp7mr1389642pad.36.1438310523977; Thu, 30 Jul 2015 19:42:03 -0700 (PDT) Received: from localhost.localdomain (205.158.164.101.ptr.us.xo.net. [205.158.164.101]) by smtp.gmail.com with ESMTPSA id xs13sm4561776pac.3.2015.07.30.19.42.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jul 2015 19:42:03 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 30 Jul 2015 19:41:46 -0700 Message-Id: <1438310507-10750-6-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438310507-10750-1-git-send-email-bill.fischofer@linaro.org> References: <1438310507-10750-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3 5/6] 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.179 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 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 95fc8df..0ab91e4 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 the order associated with an event + * + * This call tells the scheduler that order 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. + * + * Order release 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 order preservation. + * + * @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