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 803D1C4332F for ; Mon, 7 Nov 2022 23:33:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC5CF10E08A; Mon, 7 Nov 2022 23:33:42 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 682CA10E08A for ; Mon, 7 Nov 2022 23:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667864019; x=1699400019; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=N5ZQAEuIeAckthK8l2cMQPyQK1SH+pN6dsr0KujCGWw=; b=XRFxYTVAxk6HkYF1AyrLSPaOP+EfNLTz4Ytx3io48eR2MB0hLigMaBqA /3IWwxdevx3TixEdV1QOU5DsUSI204yX35j+9QyWsZ96ZD1ZKzy6linuz PV3eM6QKnOnsm3lGn1EyMxuKLSHjrWfGNIi/u4reiQE49YlUoGhlu4QoV BkcfmShJuF/0CwPN23auPAxb5iqvprqmElkyHo1O0EiLAyXzNMn7r1h3+ e6VvtCgHCRZscFsgWEh1aBkTdrSVgE+A82FWO4lMnFsUQgltE1jZ0JOPB oqOKO+bBc0OHLbwvRTHc6xqjJrTpBf6FsjHzKrLUlSx7sfD7r4lq2/wQA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="396848799" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="396848799" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 15:33:38 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="669328931" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="669328931" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.72.209]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 15:33:38 -0800 Date: Mon, 07 Nov 2022 15:33:32 -0800 Message-ID: <87o7til4qb.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20221105003235.1717908-3-umesh.nerlige.ramappa@intel.com> References: <20221105003235.1717908-1-umesh.nerlige.ramappa@intel.com> <20221105003235.1717908-3-umesh.nerlige.ramappa@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-pc-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 Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/selftest: Bump up sample period for busy stats selftest 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, 04 Nov 2022 17:32:35 -0700, Umesh Nerlige Ramappa wrote: > > Engine busyness samples around a 10ms period is failing with busyness > ranging approx. from 87% to 115%. The expected range is +/- 5% of the > sample period. > > When determining busyness of active engine, the GuC based engine > busyness implementation relies on a 64 bit timestamp register read. The > latency incurred by this register read causes the failure. > > On DG1, when the test fails, the observed latencies range from 900us - > 1.5ms. > > One solution tried was to reduce the latency between reg read and > CPU timestamp capture, but such optimization does not add value to user > since the CPU timestamp obtained here is only used for (1) selftest and > (2) i915 rps implementation specific to execlist scheduler. Also, this > solution only reduces the frequency of failure and does not eliminate > it. > > In order to make the selftest more robust and account for such > latencies, increase the sample period to 100 ms. Hi Umesh, I think it would be good to add to the commit message: * Gitlab bug number if any * Paste of the actual dmesg error in the commit message * Also adapt the above commit message to the fact that we've now added the optimized 64 bit read With that this is: Reviewed-by: Ashutosh Dixit If you want me to review the new commit message I can do that too. Thanks. -- Ashutosh > > Signed-off-by: Umesh Nerlige Ramappa > --- > drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c > index 0dcb3ed44a73..87c94314cf67 100644 > --- a/drivers/gpu/drm/i915/gt/selftest_engine_pm.c > +++ b/drivers/gpu/drm/i915/gt/selftest_engine_pm.c > @@ -317,7 +317,7 @@ static int live_engine_busy_stats(void *arg) > ENGINE_TRACE(engine, "measuring busy time\n"); > preempt_disable(); > de = intel_engine_get_busy_time(engine, &t[0]); > - mdelay(10); > + mdelay(100); > de = ktime_sub(intel_engine_get_busy_time(engine, &t[1]), de); > preempt_enable(); > dt = ktime_sub(t[1], t[0]); > -- > 2.36.1 >