Message ID | 1418723669-10161-5-git-send-email-ciprian.barbu@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBC42RN5IWUGBBEMDYCSAKGQE77VQREY@linaro.org> 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 377162456A for <linaro@patches.linaro.org>; Tue, 16 Dec 2014 09:55:31 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id hs14sf8432218lab.9 for <linaro@patches.linaro.org>; Tue, 16 Dec 2014 01:55:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state: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=O6/+TUsbZ2oIWyjKKSus/s3bCCRAtQ2PuicSTrX8pxs=; b=Ama2yXb9uAichPtc6DRaXOXRvBMsVFVxMlfPIuxxINDlg4zRsA2VwSTtsfLBGIF/Xp YYMMeTo3Y3+Yz/EaZrOBys0G0MiCw8dNG/tH2bwfhBufX4CmDwKlQ6vlLbVxT1ARD7Jc 8M1FqxnkqR41i1vQRd0wS4qgTOz2Upzr+zHKIZMXqB4MhU6UJlSFHWj1WAzCkyRG6Z4a qIUsXUht69xVJi+NmM2OLY/seRSAjG0upxZJ3/MOVA3nixVeqpdWTi/+qhqjnW04E/gD yX5xcwEF3bzgmQmRQfzgpKiZ0YjOEubAi9EA4qwsr32o7svz3dC6bcYFtGV900UjQx9y agCw== X-Gm-Message-State: ALoCoQkpwnJUK4ueeHDYLxOfi/balpX6AISwYEXxNFMK6KEUsCwy0MzcV9eEhR+nSzkrMnmDBXib X-Received: by 10.181.13.147 with SMTP id ey19mr315140wid.2.1418723730185; Tue, 16 Dec 2014 01:55:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.170 with SMTP id d10ls761113lad.37.gmail; Tue, 16 Dec 2014 01:55:29 -0800 (PST) X-Received: by 10.152.7.206 with SMTP id l14mr20069796laa.1.1418723729895; Tue, 16 Dec 2014 01:55:29 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id yi9si304749lab.58.2014.12.16.01.55.29 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 01:55:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id pv20so10888029lab.27 for <patchwork-forward@linaro.org>; Tue, 16 Dec 2014 01:55:29 -0800 (PST) X-Received: by 10.112.170.36 with SMTP id aj4mr34603523lbc.3.1418723729812; Tue, 16 Dec 2014 01:55:29 -0800 (PST) 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.142.69 with SMTP id ru5csp982786lbb; Tue, 16 Dec 2014 01:55:29 -0800 (PST) X-Received: by 10.224.75.193 with SMTP id z1mr62485624qaj.91.1418723728208; Tue, 16 Dec 2014 01:55:28 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id q5si210592qal.127.2014.12.16.01.55.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Dec 2014 01:55:28 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <lng-odp-bounces@lists.linaro.org>) id 1Y0oqj-0006wk-KB; Tue, 16 Dec 2014 09:55:25 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from <ciprian.barbu@linaro.org>) id 1Y0oqQ-0006sG-3Z for lng-odp@lists.linaro.org; Tue, 16 Dec 2014 09:55:06 +0000 Received: by mail-la0-f52.google.com with SMTP id hs14so10773512lab.25 for <lng-odp@lists.linaro.org>; Tue, 16 Dec 2014 01:55:00 -0800 (PST) X-Received: by 10.112.156.169 with SMTP id wf9mr34694388lbb.85.1418723700504; Tue, 16 Dec 2014 01:55:00 -0800 (PST) Received: from cipriantemp.enea.se (sestofw01.enea.se. [192.36.1.252]) by mx.google.com with ESMTPSA id l9sm92457lae.0.2014.12.16.01.54.58 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 01:54:59 -0800 (PST) From: Ciprian Barbu <ciprian.barbu@linaro.org> To: lng-odp@lists.linaro.org, petri.savolainen@nsn.com, ola.liljedahl@linaro.org Date: Tue, 16 Dec 2014 11:54:29 +0200 Message-Id: <1418723669-10161-5-git-send-email-ciprian.barbu@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1418723669-10161-1-git-send-email-ciprian.barbu@linaro.org> References: <1418723669-10161-1-git-send-email-ciprian.barbu@linaro.org> Subject: [lng-odp] [RFC 4/4] schedule: fix priority scheduling bug X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.linaro.org/mailman/listinfo/lng-odp>, <mailto:lng-odp-request@lists.linaro.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ciprian.barbu@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.54 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 |
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index aa11b7b..06e3889 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -264,7 +264,7 @@ static int schedule(odp_queue_t *out_queue, odp_buffer_t out_buf[], id = thr & (QUEUES_PER_PRIO-1); - for (j = 0; j < QUEUES_PER_PRIO; j++, id++) { + for (j = 0; j < QUEUES_PER_PRIO; ) { odp_queue_t pri_q; odp_buffer_t desc_buf; @@ -321,6 +321,9 @@ static int schedule(odp_queue_t *out_queue, odp_buffer_t out_buf[], return ret; } + + j++; + id++; } }
Before this fix the scheduler would skip the current list of queues per priority if it found an empty queue. An empty queue can get in the scheduling list if the last dequeue popped all the buffers (MAX_DEQ). Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> --- platform/linux-generic/odp_schedule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)