From patchwork Thu May 10 09:30:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10391485 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 6DDD26028E for ; Thu, 10 May 2018 09:30:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B39128680 for ; Thu, 10 May 2018 09:30:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CF9B28791; Thu, 10 May 2018 09:30:22 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D932228680 for ; Thu, 10 May 2018 09:30:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C3916EEBF; Thu, 10 May 2018 09:30:20 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A0636EEBE; Thu, 10 May 2018 09:30:18 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 11654885-1500050 for multiple; Thu, 10 May 2018 10:30:07 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Thu, 10 May 2018 10:30:06 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 10 May 2018 10:30:02 +0100 Message-Id: <20180510093002.30902-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417084112.8352-1-tvrtko.ursulin@linux.intel.com> References: <20180417084112.8352-1-tvrtko.ursulin@linux.intel.com> X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Subject: [Intel-gfx] [PATCH i-g-t] igt/gem_exec_latency: Report stddev for rthog X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Report and compare stddev instead of variance so that direct submission passes ;) --- tests/gem_exec_latency.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/gem_exec_latency.c b/tests/gem_exec_latency.c index 547d728b3..757b390d0 100644 --- a/tests/gem_exec_latency.c +++ b/tests/gem_exec_latency.c @@ -429,7 +429,7 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_warn("Failed to set scheduling policy!\n"); msg.status = RT_FAIL; write(link[1], &msg, sizeof(msg)); - exit(1); + break; } } @@ -439,7 +439,7 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) passname[pass]); msg.status = RT_FAIL; write(link[1], &msg, sizeof(msg)); - exit(1); + break; } igt_spin_busywait_until_running(spin); @@ -457,7 +457,7 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_warn("Wait timeout! (%s)\n", passname[pass]); write(link[1], &msg, sizeof(msg)); - exit(1); + break; } if (t > msg.max) @@ -468,17 +468,15 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_spin_batch_free(fd, spin); - igt_info("%10s: mean=%.2fus variance=%.2fus max=%.2fus (n=%lu)\n", + igt_info("%10s: mean=%.2fus stddev=%.3fus max=%.2fus (n=%lu)\n", passname[pass], igt_mean_get(&msg.mean) * 1e6, - igt_mean_get_variance(&msg.mean) * 1e6, + sqrt(igt_mean_get_variance(&msg.mean)) * 1e6, msg.max * 1e6, msg.mean.count); write(link[1], &msg, sizeof(msg)); } while (++pass < 3); - - exit(0); } for (i = 0; i < 3; i++) { @@ -494,11 +492,12 @@ rthog_latency_on_ring(int fd, unsigned int ring, const char *name) igt_waitchildren(); /* - * Check that the submission latency variance for a task with RT - * priority is no larger than three times the same of a normal task. + * Check that the submission latency stddev for a task with RT + * priority is no larger than three times the same of a normal task, + * (since variance is the square of stddev, we check 9 times) */ igt_assert(igt_mean_get_variance(&res[2].mean) < - igt_mean_get_variance(&res[1].mean) * 3); + igt_mean_get_variance(&res[1].mean) * 9); } igt_main