From patchwork Mon Nov 28 05:46:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi He X-Patchwork-Id: 84357 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp994726qgi; Sun, 27 Nov 2016 21:48:03 -0800 (PST) X-Received: by 10.55.115.6 with SMTP id o6mr18602920qkc.271.1480312082969; Sun, 27 Nov 2016 21:48:02 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e126si31252115qkb.161.2016.11.27.21.48.02; Sun, 27 Nov 2016 21:48:02 -0800 (PST) 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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9F0F562B85; Mon, 28 Nov 2016 05:48: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, RCVD_IN_DNSWL_NONE, 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 CB8A6611FC; Mon, 28 Nov 2016 05:47:56 +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 338AD60925; Mon, 28 Nov 2016 05:47:53 +0000 (UTC) Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by lists.linaro.org (Postfix) with ESMTPS id 29D7D60925 for ; Mon, 28 Nov 2016 05:47:32 +0000 (UTC) Received: by mail-pf0-f176.google.com with SMTP id i88so22724845pfk.2 for ; Sun, 27 Nov 2016 21:47:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vDyD8aip2rBaro98KdR6HMuPRLQEPDmcIHpeLuf5HBc=; b=ZQbzI1DXbPYhQUR99HatLIl/CGlp/6gbrNV9tz7PJE8o/ed3WMlBFL4fwh4xjqOQpS +lldlJkDzdRsUcow2FNffygiZI6YeIfUbt1ex+Nl/Hd7NxS6pluwr1OjDhiwBN959+Cg R/4tImkn0vcE2GvdyqLKmLKX2ssFxoJHNrzJ47anDtEKZj5JLi3p3X008qsnC46YhDOI W+Vq1hfa7ZanF1dXso/uaXM9Bvf2asmEnwc+Fvu+VMslZbPn1jHTEatbzJ9oELm3ByGF VXhxWCnLlQ3mafHpxIEZIWlAt0u32EYqq4F/G5otSnYDqY5M2fNWhnnfyVuwRms6R+CY oaEA== X-Gm-Message-State: AKaTC01NaZZzxZi3ri4IUTGompVQ5Ua1U+gEFpoEZuQ8FNYhoQKJnzHknmB09Ft9V6HwADH91C0= X-Received: by 10.84.215.148 with SMTP id l20mr46053494pli.120.1480312051492; Sun, 27 Nov 2016 21:47:31 -0800 (PST) Received: from ubuntu.heyii.co (ubuntu.heyii.co. [45.32.66.203]) by smtp.googlemail.com with ESMTPSA id t89sm83678501pfe.50.2016.11.27.21.47.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Nov 2016 21:47:31 -0800 (PST) From: Yi He To: lng-odp@lists.linaro.org Date: Mon, 28 Nov 2016 05:46:47 +0000 Message-Id: <1480312009-32464-2-git-send-email-yi.he@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1480312009-32464-1-git-send-email-yi.he@linaro.org> References: <1480312009-32464-1-git-send-email-yi.he@linaro.org> Subject: [lng-odp] [API-NEXT PATCH 1/3] linux-gen: scheduler: cache_order_info with explicit event 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" Signed-off-by: Yi He --- platform/linux-generic/include/odp_schedule_internal.h | 2 +- platform/linux-generic/odp_schedule.c | 2 +- platform/linux-generic/odp_schedule_ordered.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/platform/linux-generic/include/odp_schedule_internal.h b/platform/linux-generic/include/odp_schedule_internal.h index 02637c2..ede4723 100644 --- a/platform/linux-generic/include/odp_schedule_internal.h +++ b/platform/linux-generic/include/odp_schedule_internal.h @@ -35,7 +35,7 @@ typedef struct { extern __thread sched_local_t sched_local; -void cache_order_info(uint32_t queue_index); +void cache_order_info(uint32_t queue_index, odp_event_t ev); int release_order(void *origin_qe, uint64_t order, odp_pool_t pool, int enq_called); diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index dfc9555..1ef85ac 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -630,7 +630,7 @@ static int do_schedule(odp_queue_t *out_queue, odp_event_t out_ev[], ring_enq(ring, PRIO_QUEUE_MASK, qi); /* Cache order info about this event */ - cache_order_info(qi); + cache_order_info(qi, sched_local.ev_stash[0]); } else if (sched_cb_queue_is_atomic(qi)) { /* Hold queue during atomic access */ sched_local.queue_index = qi; diff --git a/platform/linux-generic/odp_schedule_ordered.c b/platform/linux-generic/odp_schedule_ordered.c index 5574faf..bfa7fd6 100644 --- a/platform/linux-generic/odp_schedule_ordered.c +++ b/platform/linux-generic/odp_schedule_ordered.c @@ -800,11 +800,10 @@ void schedule_order_unlock(unsigned lock_index) odp_atomic_fetch_inc_u64(&origin_qe->s.sync_out[lock_index]); } -void cache_order_info(uint32_t queue_index) +void cache_order_info(uint32_t queue_index, odp_event_t ev) { uint32_t i; queue_entry_t *qe = get_qentry(queue_index); - odp_event_t ev = sched_local.ev_stash[0]; odp_buffer_hdr_t *buf_hdr = buf_hdl_to_hdr(odp_buffer_from_event(ev)); sched_local.origin_qe = qe;