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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DE577C47DB7 for ; Thu, 18 Jan 2024 19:38:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86CDA10E15B; Thu, 18 Jan 2024 19:38:22 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id D32EE10E15B for ; Thu, 18 Jan 2024 19:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705606701; x=1737142701; h=date:message-id:from:to:subject:in-reply-to:references: mime-version; bh=x/vXX+OQgKj7W/+drdf6H9UKksHMezNQY0755eJQ8oc=; b=YC2ye9Fq+yT1vCrgwntBY3AxWwij7FrcrXTp1zE0+Shxsz6zo9/LXFLP m3nv84E8mbyxjHdWIXLhblYHDQJ3mDjyPHgGGDAd3V1UXGp0BuLjI2ioT wxlz4JRqVuvndArT7pGMTs6CZ2GqhVVTTaczEc6Esh5X+1VmOHkRVIKmz ZlLF91k347T9t75pQDzmglPSnyiJvE27Oves+fLZ42Pqk0FjoqSm1ALp8 QQ9tYEfb4AjFKtjgazVphuQcNye5CkMndEgXGie6YHO4PHyOGcYOLIYUY noQOW4hNg2Vwo3yXi8B+NElW1X6E/Ya+QjFHDAqTQwQKauKh+3aVmj7xm w==; X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="7262667" X-IronPort-AV: E=Sophos;i="6.05,203,1701158400"; d="scan'208";a="7262667" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 11:38:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="784873039" X-IronPort-AV: E=Sophos;i="6.05,203,1701158400"; d="scan'208";a="784873039" Received: from orsosgc001.jf.intel.com (HELO unerlige-ril.intel.com) ([10.165.21.138]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 11:38:19 -0800 Date: Thu, 18 Jan 2024 11:38:19 -0800 Message-ID: <85a5p2ctzo.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: igt-dev@lists.freedesktop.org, Umesh Nerlige Ramappa Subject: Re: [PATCH i-g-t] i915/perf: Fix loop termination logic in two tests In-Reply-To: <20240118045525.911523-1-ashutosh.dixit@intel.com> References: <20240118045525.911523-1-ashutosh.dixit@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-redhat-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" On Wed, 17 Jan 2024 20:55:25 -0800, Ashutosh Dixit wrote: > Hi Umesh, > The code in af9910b3967d ("i915/perf: Check regularly if we are done > reading reports") does not match the commit description. Fix the code to > match the commit description. > > Fixes: af9910b3967d ("i915/perf: Check regularly if we are done reading reports") > Cc: Umesh Nerlige Ramappa > Signed-off-by: Ashutosh Dixit > --- > tests/intel/perf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/intel/perf.c b/tests/intel/perf.c > index 3565d61cc393..94738b8a58b4 100644 > --- a/tests/intel/perf.c > +++ b/tests/intel/perf.c > @@ -3052,7 +3052,7 @@ test_buffer_fill(const struct intel_execution_engine2 *e) > first_timestamp = oa_timestamp(report, fmt); > last_timestamp = oa_timestamp(report, fmt); > > - if (((last_timestamp - first_timestamp) * oa_period) < (fill_duration / 2)) > + if (((last_timestamp - first_timestamp) * oa_period) >= (fill_duration / 2)) > break; > > if (oa_report_is_periodic(oa_exponent, report)) { > @@ -3279,7 +3279,7 @@ test_enable_disable(const struct intel_execution_engine2 *e) > oa_report_is_periodic(oa_exponent, report), > oa_report_get_ctx_id(report)); > > - if (((last_timestamp - first_timestamp) * oa_period) < (fill_duration / 2)) > + if (((last_timestamp - first_timestamp) * oa_period) >= (fill_duration / 2)) > break; > > if (oa_report_is_periodic(oa_exponent, report)) { So there are CI failures with this patch, which I was expecting since I was seeing the failures locally. I ran into failures in the two tests above after making some change to Xe OA code (after removing report headers) and this patch fixed those failures. To me the code in af9910b3967d looks obviously wrong, I am not sure what failures it was solving. I think the right thing to do would be to revert af9910b3967d. Anyway, no need to do anything for i915, but to get round failures in the latest Xe code I am dropping the two lines above (basically reverting af9910b3967d) for Xe. Thanks. -- Ashutosh