From patchwork Mon Jan 12 20:46:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 42971 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D87E820DE8 for ; Mon, 12 Jan 2015 20:46:36 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf7813766wiw.0 for ; Mon, 12 Jan 2015 12:46:36 -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=JwgEyaNy5QlbfCD1KYkzpBKv67vh56gcxKSg9L9wRHQ=; b=IIPPqMhMnigtGwyHLKrZ6Hk6JUUr+WB8kiCz+zySmXYUiaCYlV8cbryZXF5QLwk2dS si0ZBF88sc/iM4SyEtstfz2d2pAtPqIDRCq4sdKzhmlAxc/Zu0izCkd5+H7ym+ABM/mG A1fapVPcELQUknmpRpJ1wFSB4snM7T2VfSU8JqlnY/f8HzjTsh1ELUCUOtmnE7TD4XpX XxlhmLJ0mOaSD1EkW0la+jQjz8TKQGlqDzvLdnKN9SDNCGbf7LNUpnFKuBVuPt4h1mkq QNGZpGhHXCZariCCS/SPLN1cGJaKb038WtEqerqiMyvqmFiwBmlL305bQ/Yu/x6AA29V At0Q== X-Gm-Message-State: ALoCoQmwLQhHxbjNpuurGOKLbC+u5pGeYmJKpyUjdmzC7J+kjWdfXt7xl5SOxbr9gG98NXOMzmQt X-Received: by 10.194.204.201 with SMTP id la9mr6058wjc.6.1421095596104; Mon, 12 Jan 2015 12:46:36 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.200 with SMTP id n8ls660575lag.15.gmail; Mon, 12 Jan 2015 12:46:35 -0800 (PST) X-Received: by 10.112.185.101 with SMTP id fb5mr38858358lbc.12.1421095595944; Mon, 12 Jan 2015 12:46:35 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id em9si22334436lbc.102.2015.01.12.12.46.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 12:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id l4so19697418lbv.11 for ; Mon, 12 Jan 2015 12:46:35 -0800 (PST) X-Received: by 10.152.197.5 with SMTP id iq5mr38564961lac.6.1421095595794; Mon, 12 Jan 2015 12:46:35 -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.9.200 with SMTP id c8csp1188760lbb; Mon, 12 Jan 2015 12:46:34 -0800 (PST) X-Received: by 10.140.39.167 with SMTP id v36mr50745666qgv.77.1421095594308; Mon, 12 Jan 2015 12:46:34 -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 v6si23966597qag.104.2015.01.12.12.46.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 12 Jan 2015 12:46:34 -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 ) id 1YAlsd-00047X-Q9; Mon, 12 Jan 2015 20:46:31 +0000 Received: from mail-qg0-f45.google.com ([209.85.192.45]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YAlsT-000443-GI for lng-odp@lists.linaro.org; Mon, 12 Jan 2015 20:46:21 +0000 Received: by mail-qg0-f45.google.com with SMTP id z107so19572817qgd.4 for ; Mon, 12 Jan 2015 12:46:16 -0800 (PST) X-Received: by 10.140.23.210 with SMTP id 76mr49894595qgp.84.1421095576263; Mon, 12 Jan 2015 12:46:16 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id p7sm15795457qat.4.2015.01.12.12.46.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jan 2015 12:46:15 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 12 Jan 2015 15:46:06 -0500 Message-Id: <1421095567-31613-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421095567-31613-1-git-send-email-mike.holmes@linaro.org> References: <1421095567-31613-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v3 1/2] test: perf: scheduling: remove odp_schedule_one X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@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.180 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: Mike Holmes --- test/performance/odp_scheduling.c | 143 -------------------------------------- 1 file changed, 143 deletions(-) diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index ba7528d..72656c4 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -311,125 +311,6 @@ static int test_poll_queue(int thr, odp_buffer_pool_t msg_pool) } /** - * @internal Test scheduling of a single queue - with odp_schedule_one() - * - * Enqueue a buffer to the shared queue. Schedule and enqueue the received - * buffer back into the queue. - * - * @param str Test case name string - * @param thr Thread - * @param msg_pool Buffer pool - * @param prio Priority - * @param barrier Barrier - * - * @return 0 if successful - */ -static int test_schedule_one_single(const char *str, int thr, - odp_buffer_pool_t msg_pool, - int prio, odp_barrier_t *barrier) -{ - odp_buffer_t buf; - odp_queue_t queue; - uint64_t t1, t2, cycles, ns; - uint32_t i; - uint32_t tot = 0; - - if (create_queue(thr, msg_pool, prio)) - return -1; - - t1 = odp_time_cycles(); - - for (i = 0; i < QUEUE_ROUNDS; i++) { - buf = odp_schedule_one(&queue, ODP_SCHED_WAIT); - - if (odp_queue_enq(queue, buf)) { - LOG_ERR(" [%i] Queue enqueue failed.\n", thr); - return -1; - } - } - - if (odp_queue_sched_type(queue) == ODP_SCHED_SYNC_ATOMIC) - odp_schedule_release_atomic(); - - t2 = odp_time_cycles(); - cycles = odp_time_diff_cycles(t1, t2); - ns = odp_time_cycles_to_ns(cycles); - tot = i; - - odp_barrier_wait(barrier); - clear_sched_queues(); - - cycles = cycles/tot; - ns = ns/tot; - - printf(" [%i] %s enq+deq %"PRIu64" cycles, %"PRIu64" ns\n", - thr, str, cycles, ns); - - return 0; -} - -/** - * @internal Test scheduling of multiple queues - with odp_schedule_one() - * - * Enqueue a buffer to each queue. Schedule and enqueue the received - * buffer back into the queue it came from. - * - * @param str Test case name string - * @param thr Thread - * @param msg_pool Buffer pool - * @param prio Priority - * @param barrier Barrier - * - * @return 0 if successful - */ -static int test_schedule_one_many(const char *str, int thr, - odp_buffer_pool_t msg_pool, - int prio, odp_barrier_t *barrier) -{ - odp_buffer_t buf; - odp_queue_t queue; - uint64_t t1 = 0; - uint64_t t2 = 0; - uint64_t cycles, ns; - uint32_t i; - uint32_t tot = 0; - - if (create_queues(thr, msg_pool, prio)) - return -1; - - /* Start sched-enq loop */ - t1 = odp_time_cycles(); - - for (i = 0; i < QUEUE_ROUNDS; i++) { - buf = odp_schedule_one(&queue, ODP_SCHED_WAIT); - - if (odp_queue_enq(queue, buf)) { - LOG_ERR(" [%i] Queue enqueue failed.\n", thr); - return -1; - } - } - - if (odp_queue_sched_type(queue) == ODP_SCHED_SYNC_ATOMIC) - odp_schedule_release_atomic(); - - t2 = odp_time_cycles(); - cycles = odp_time_diff_cycles(t1, t2); - ns = odp_time_cycles_to_ns(cycles); - tot = i; - - odp_barrier_wait(barrier); - clear_sched_queues(); - - cycles = cycles/tot; - ns = ns/tot; - - printf(" [%i] %s enq+deq %"PRIu64" cycles, %"PRIu64" ns\n", - thr, str, cycles, ns); - - return 0; -} - -/** * @internal Test scheduling of a single queue - with odp_schedule() * * Enqueue a buffer to the shared queue. Schedule and enqueue the received @@ -763,24 +644,12 @@ static void *run_thread(void *arg) odp_barrier_wait(barrier); - if (test_schedule_one_single("sched_one_s_lo", thr, msg_pool, - ODP_SCHED_PRIO_LOWEST, barrier)) - return NULL; - - odp_barrier_wait(barrier); - if (test_schedule_single("sched_____s_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) return NULL; odp_barrier_wait(barrier); - if (test_schedule_one_many("sched_one_m_lo", thr, msg_pool, - ODP_SCHED_PRIO_LOWEST, barrier)) - return NULL; - - odp_barrier_wait(barrier); - if (test_schedule_many("sched_____m_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) return NULL; @@ -795,24 +664,12 @@ static void *run_thread(void *arg) odp_barrier_wait(barrier); - if (test_schedule_one_single("sched_one_s_hi", thr, msg_pool, - ODP_SCHED_PRIO_HIGHEST, barrier)) - return NULL; - - odp_barrier_wait(barrier); - if (test_schedule_single("sched_____s_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) return NULL; odp_barrier_wait(barrier); - if (test_schedule_one_many("sched_one_m_hi", thr, msg_pool, - ODP_SCHED_PRIO_HIGHEST, barrier)) - return NULL; - - odp_barrier_wait(barrier); - if (test_schedule_many("sched_____m_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) return NULL;