From patchwork Thu Sep 3 15:16:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 53030 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 1B02B22E23 for ; Thu, 3 Sep 2015 15:18:07 +0000 (UTC) Received: by lamp12 with SMTP id p12sf15862383lam.2 for ; Thu, 03 Sep 2015 08:18:06 -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=UwKkwMTAOGcUBAlzD8j6KXKJP+U9lhECZ/y7Av3wUcQ=; b=jz3RM0NQbJgjenUrVhSLe9AnwTVFuRTYLZEdIxsGFLdOjKDLx+YNFrsNp0AWpjW4Lh +HE2e7yO58plBXZbmpv//eCCADyp6C6YI3HsYYj3j4hYuIWus4zFTDvGorg4LsmeJw3l rxdgBKwL2NHoSIjQk0TlnCBYWdcX/dcrsBMB0inRn08Ylkky/kgl6MJQQjQZU6KMtM7+ eyzTvED8bF7FG6GLAhqbe0p/0g4gsH4mnPbUA89s7dhpry2hz/3m4aHON8+UR9YUmwO2 R6y+z4xu9btnxD23Ab68TIEuleiixI0ChK/NAbf88UmWuliVt/oeLnOYvMLhwg7JHaoK WCnw== X-Gm-Message-State: ALoCoQk2llTNkibxWbjrjzoKxvIiS5dcNClNAs3gow88/lmRcWzTBObdRszsG1JdEehe5lHoiZys X-Received: by 10.180.77.105 with SMTP id r9mr2775823wiw.0.1441293486073; Thu, 03 Sep 2015 08:18:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.239.161 with SMTP id vt1ls127174lac.41.gmail; Thu, 03 Sep 2015 08:18:05 -0700 (PDT) X-Received: by 10.152.6.73 with SMTP id y9mr22442644lay.45.1441293485781; Thu, 03 Sep 2015 08:18:05 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id h4si19267088lbj.32.2015.09.03.08.18.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2015 08:18:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lamp12 with SMTP id p12so29237780lam.0 for ; Thu, 03 Sep 2015 08:18:05 -0700 (PDT) X-Received: by 10.112.141.136 with SMTP id ro8mr22324723lbb.88.1441293485652; Thu, 03 Sep 2015 08:18:05 -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.164.42 with SMTP id yn10csp1342750lbb; Thu, 3 Sep 2015 08:18:04 -0700 (PDT) X-Received: by 10.140.104.239 with SMTP id a102mr7266319qgf.9.1441293484653; Thu, 03 Sep 2015 08:18:04 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j68si30291447qgd.71.2015.09.03.08.18.03; Thu, 03 Sep 2015 08:18:04 -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 D289961A30; Thu, 3 Sep 2015 15:18:03 +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, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 8F2DE61A32; Thu, 3 Sep 2015 15:16:55 +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 CF8F161A2C; Thu, 3 Sep 2015 15:16:50 +0000 (UTC) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by lists.linaro.org (Postfix) with ESMTPS id 790D561990 for ; Thu, 3 Sep 2015 15:16:48 +0000 (UTC) Received: by obbbh8 with SMTP id bh8so35100400obb.0 for ; Thu, 03 Sep 2015 08:16:48 -0700 (PDT) X-Received: by 10.60.34.72 with SMTP id x8mr17793425oei.39.1441293407898; Thu, 03 Sep 2015 08:16:47 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id e73sm1525294oib.3.2015.09.03.08.16.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Sep 2015 08:16:47 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org, maxim.uvarov@linaro.org Date: Thu, 3 Sep 2015 10:16:34 -0500 Message-Id: <1441293400-28777-3-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441293400-28777-1-git-send-email-bill.fischofer@linaro.org> References: <1441293400-28777-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 2/8] linux-generic: schedule: correct scheduling for ordered queues 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.215.53 as permitted sender) smtp.mailfrom=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 Ordered queues must be rescheduled before caching context locally to avoid contaminating the scheduler poll queues with false ordering info. Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_schedule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index d2543ad..a88ba4d 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -544,14 +544,16 @@ static int schedule(odp_queue_t *out_queue, odp_event_t out_ev[], ret = copy_events(out_ev, max_num); if (queue_is_ordered(qe)) { + /* Continue scheduling ordered queues */ + if (odp_queue_enq(pri_q, ev)) + ODP_ABORT("schedule failed\n"); + /* Cache order info about this event */ sched_local.origin_qe = qe; sched_local.order = sched_local.buf_hdr[0]->order; sched_local.sync = sched_local.buf_hdr[0]->sync; sched_local.enq_called = 0; - if (odp_queue_enq(pri_q, ev)) - ODP_ABORT("schedule failed\n"); } else if (queue_is_atomic(qe)) { /* Hold queue during atomic access */ sched_local.pri_queue = pri_q;