From patchwork Thu Sep 3 00:07:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 52998 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id DB77E23002 for ; Thu, 3 Sep 2015 00:08:37 +0000 (UTC) Received: by lagj9 with SMTP id j9sf10347912lag.0 for ; Wed, 02 Sep 2015 17:08:36 -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=MsTueLGe501Q1kOvPe6EUxyV/yp0Fkr71cowalfN1MoQCiGiM2hOcCK0v/gNyaVG6H 2OrAoWgkh7NrxYRgHp/gI8PzXckVA6pO1YbDg8OlD2V//Gsda0+Ukr1htkdJen5RhHnu Fl8WoYCMp+sLXWuah2/2e2qTf/euM6xBEW3N2lPN7ANPWr1XH/1EmApuBZpR/Hi9Z+/7 yez++KNS97H48qGJlJORgZZgZqlVtR+k/W65G4nTsmKjkNjoLuDaaFQwpf2Yh8Ids78x mEoK3fsCobBbn2YwVnUxxE63IlcBQ+r5VfT7739MsMo+0g1SNb2zYB5S2ueihp9+ti0o z1xQ== X-Gm-Message-State: ALoCoQmISBYe7gWP5Im3vWIzOrWteWUfnt1XFW07i7Jb+OphFApi5b2uzkSetdr+RDc6Bbq4p5Bf X-Received: by 10.180.83.226 with SMTP id t2mr1754605wiy.5.1441238916741; Wed, 02 Sep 2015 17:08:36 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.100 with SMTP id l4ls145683lam.80.gmail; Wed, 02 Sep 2015 17:08:36 -0700 (PDT) X-Received: by 10.152.28.229 with SMTP id e5mr18629422lah.110.1441238916568; Wed, 02 Sep 2015 17:08:36 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id s8si21382560laa.81.2015.09.02.17.08.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2015 17:08:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagj9 with SMTP id j9so18242839lag.2 for ; Wed, 02 Sep 2015 17:08:36 -0700 (PDT) X-Received: by 10.152.18.194 with SMTP id y2mr9393740lad.88.1441238916319; Wed, 02 Sep 2015 17:08:36 -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 yn10csp909546lbb; Wed, 2 Sep 2015 17:08:35 -0700 (PDT) X-Received: by 10.140.237.140 with SMTP id i134mr64747962qhc.81.1441238915527; Wed, 02 Sep 2015 17:08:35 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n19si18235388qhb.34.2015.09.02.17.08.34; Wed, 02 Sep 2015 17:08:35 -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 85A7B61A06; Thu, 3 Sep 2015 00:08:34 +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 0CB5061A0D; Thu, 3 Sep 2015 00:07:39 +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 3FDEA61A04; Thu, 3 Sep 2015 00:07:29 +0000 (UTC) Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) by lists.linaro.org (Postfix) with ESMTPS id EEE79619EC for ; Thu, 3 Sep 2015 00:07:27 +0000 (UTC) Received: by obcts10 with SMTP id ts10so22403605obc.1 for ; Wed, 02 Sep 2015 17:07:27 -0700 (PDT) X-Received: by 10.182.224.163 with SMTP id rd3mr16018872obc.61.1441238847466; Wed, 02 Sep 2015 17:07:27 -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 k5sm15601814oev.16.2015.09.02.17.07.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Sep 2015 17:07:27 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org, maxim.uvarov@linaro.org Date: Wed, 2 Sep 2015 19:07:16 -0500 Message-Id: <1441238841-25105-3-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441238841-25105-1-git-send-email-bill.fischofer@linaro.org> References: <1441238841-25105-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/7] 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.42 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;