From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6FC8C433DB for ; Tue, 16 Feb 2021 12:47:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60BEA64D5D for ; Tue, 16 Feb 2021 12:47:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60BEA64D5D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDB1788EE9; Tue, 16 Feb 2021 12:47:06 +0000 (UTC) Received: from fireflyinternet.com (unknown [77.68.26.236]) by gabe.freedesktop.org (Postfix) with ESMTPS id ED0ED88CBF; Tue, 16 Feb 2021 12:47:04 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.69.177; Received: from localhost (unverified [78.156.69.177]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 23880805-1500050 for multiple; Tue, 16 Feb 2021 12:47:02 +0000 MIME-Version: 1.0 In-Reply-To: <20210216105050.309803-1-tvrtko.ursulin@linux.intel.com> References: <20210216105050.309803-1-tvrtko.ursulin@linux.intel.com> From: Chris Wilson To: Tvrtko Ursulin , igt-dev@lists.freedesktop.org Date: Tue, 16 Feb 2021 12:47:00 +0000 Message-ID: <161347962042.8311.4583278071537199442@build.alporthouse.com> User-Agent: alot/0.9 Subject: Re: [Intel-gfx] [PATCH i-g-t] tests/i915/perf_pmu: Subtest to measure sampling error for 100% busy X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Quoting Tvrtko Ursulin (2021-02-16 10:50:50) > From: Tvrtko Ursulin > > Test that periodic reads of engine busyness against a constant 100% load > are within the 5000ppm tolerance when comparing perf timestamp versus > counter values. > > Signed-off-by: Tvrtko Ursulin > --- > tests/i915/perf_pmu.c | 46 ++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 41 insertions(+), 5 deletions(-) > > diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c > index 50b5c82bc472..728312be5293 100644 > --- a/tests/i915/perf_pmu.c > +++ b/tests/i915/perf_pmu.c > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -46,6 +47,7 @@ > #include "igt_perf.h" > #include "igt_sysfs.h" > #include "igt_pm.h" > +#include "igt_stats.h" > #include "sw_sync.h" > > IGT_TEST_DESCRIPTION("Test the i915 pmu perf interface"); > @@ -278,8 +280,11 @@ static void end_spin(int fd, igt_spin_t *spin, unsigned int flags) > static void > single(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags) > { > + unsigned int loops = flags & FLAG_LONG ? 20 : 1; > + double err_min = DBL_MAX, err_max = -DBL_MAX; > unsigned long slept; > igt_spin_t *spin; > + igt_stats_t s; > uint64_t val; > int fd; Something to record is that TEST_TRAILING_IDLE and TEST_LONG are mutually exclusive. So assert(igt_hweight(flags & (TEST_TRAILING_IDLE | TEST_LONG)) <= 1); ? -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20210216105050.309803-1-tvrtko.ursulin@linux.intel.com> References: <20210216105050.309803-1-tvrtko.ursulin@linux.intel.com> From: Chris Wilson Date: Tue, 16 Feb 2021 12:47:00 +0000 Message-ID: <161347962042.8311.4583278071537199442@build.alporthouse.com> Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] tests/i915/perf_pmu: Subtest to measure sampling error for 100% busy List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Tvrtko Ursulin , igt-dev@lists.freedesktop.org Cc: Intel-gfx@lists.freedesktop.org List-ID: Quoting Tvrtko Ursulin (2021-02-16 10:50:50) > From: Tvrtko Ursulin > > Test that periodic reads of engine busyness against a constant 100% load > are within the 5000ppm tolerance when comparing perf timestamp versus > counter values. > > Signed-off-by: Tvrtko Ursulin > --- > tests/i915/perf_pmu.c | 46 ++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 41 insertions(+), 5 deletions(-) > > diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c > index 50b5c82bc472..728312be5293 100644 > --- a/tests/i915/perf_pmu.c > +++ b/tests/i915/perf_pmu.c > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -46,6 +47,7 @@ > #include "igt_perf.h" > #include "igt_sysfs.h" > #include "igt_pm.h" > +#include "igt_stats.h" > #include "sw_sync.h" > > IGT_TEST_DESCRIPTION("Test the i915 pmu perf interface"); > @@ -278,8 +280,11 @@ static void end_spin(int fd, igt_spin_t *spin, unsigned int flags) > static void > single(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags) > { > + unsigned int loops = flags & FLAG_LONG ? 20 : 1; > + double err_min = DBL_MAX, err_max = -DBL_MAX; > unsigned long slept; > igt_spin_t *spin; > + igt_stats_t s; > uint64_t val; > int fd; Something to record is that TEST_TRAILING_IDLE and TEST_LONG are mutually exclusive. So assert(igt_hweight(flags & (TEST_TRAILING_IDLE | TEST_LONG)) <= 1); ? -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev