From patchwork Wed Aug 3 15:36:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gordon X-Patchwork-Id: 9261525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3B47160754 for ; Wed, 3 Aug 2016 15:37:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D4B227F60 for ; Wed, 3 Aug 2016 15:37:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2227128236; Wed, 3 Aug 2016 15:37:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF96827F60 for ; Wed, 3 Aug 2016 15:37:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FB996E81B; Wed, 3 Aug 2016 15:37:16 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id F36F06E842 for ; Wed, 3 Aug 2016 15:36:55 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 03 Aug 2016 08:36:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,466,1464678000"; d="scan'208";a="743683237" Received: from dsgordon-linux2.isw.intel.com ([10.102.226.88]) by FMSMGA003.fm.intel.com with ESMTP; 03 Aug 2016 08:36:55 -0700 From: Dave Gordon To: intel-gfx@lists.freedesktop.org Date: Wed, 3 Aug 2016 16:36:47 +0100 Message-Id: <1470238607-34415-3-git-send-email-david.s.gordon@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470238607-34415-1-git-send-email-david.s.gordon@intel.com> References: <1470238607-34415-1-git-send-email-david.s.gordon@intel.com> Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Subject: [Intel-gfx] [PATCH 2/2] igt/gem_exec_nop: clarify & extend output from parallel execution test X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP To make sense of the output of the parallel execution test (preferably without reading the source!), we need to see the various measurements that it makes, specifically: time/batch on each engine separately, total time across all engines sequentially, and the time/batch when the work is distributed over all engines in parallel. Since we know the per-batch time on the slowest engine (which will determine the minimum possible execution time of any equal-split parallel test), we can also calculate a new figure representing the degree to which work on the faster engines is overlapped with that on the slowest engine, and therefore does not contribute to the total time. Here we choose to present it as a percentage, with parallel-time==serial time giving 0% overlap, up to parallel-time==slowest-engine- time/n_engines being 100%. Note that negative values are possible; values greater than 100% may also be possible, although less likely. Signed-off-by: Dave Gordon Reviewed-by: John Harrison --- tests/gem_exec_nop.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c index c2bd472..05aa383 100644 --- a/tests/gem_exec_nop.c +++ b/tests/gem_exec_nop.c @@ -137,7 +137,9 @@ static void all(int fd, uint32_t handle, int timeout) if (ignore_engine(fd, engine)) continue; - time = nop_on_ring(fd, handle, engine, 1, &count) / count; + time = nop_on_ring(fd, handle, engine, 2, &count) / count; + igt_info("%s: %'lu cycles: %.3fus/batch\n", + e__->name, count, time*1e6); if (time > max) { name = e__->name; max = time; @@ -148,8 +150,9 @@ static void all(int fd, uint32_t handle, int timeout) engines[nengine++] = engine; } igt_require(nengine); - igt_info("Maximum execution latency on %s, %.3fus, total %.3fus per cycle\n", - name, max*1e6, sum*1e6); + igt_info("Slowest engine was %s, %.3fus/batch\n", name, max*1e6); + igt_info("Total for all %d engines is %.3fus per cycle, average %.3fus/batch\n", + nengine, sum*1e6, sum*1e6/nengine); memset(&obj, 0, sizeof(obj)); obj.handle = handle; @@ -187,8 +190,10 @@ static void all(int fd, uint32_t handle, int timeout) igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); time = elapsed(&start, &now) / count; - igt_info("All (%d engines): %'lu cycles, average %.3fus per cycle\n", - nengine, count, 1e6*time); + igt_info("All %d engines (parallel/%d): %'lu cycles, " + "average %.3fus/batch, overlap %.1f%\n", + nengine, BURST, count, + 1e6*time, 100*(sum-time)/(sum-(max/nengine))); /* The rate limiting step is how fast the slowest engine can * its queue of requests, if we wait upon a full ring all dispatch