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 5D936D597C4 for ; Wed, 13 Nov 2024 02:00:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E95C810E322; Wed, 13 Nov 2024 02:00:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="l+ULqrHX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E52010E322 for ; Wed, 13 Nov 2024 02:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731463242; x=1762999242; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=2BoSFIRndc+WwKeFzdm5WRsqy3lhTQiRhWLAhyVBcSk=; b=l+ULqrHXrxl0vcuArSI1ONe1lNwkiqoaLQs2/4IxI5TK3S6QgRti22VT yufzCrOuoD0GSn1o/hWyYWRpTLOIxNEtmg3Uf1YcYI/G/z0dYl2HEngeC Hxu0+etAybLDI+Hug+wvPJdKC0ww1Edb5nOWBVJvdttfAaAJSH3W/TAWS 0VSDNmxc/ck1tgwDcbvWRhRYXE8rgL22AleEpO2supbniQq7XU5fpyL3G iQ3GXS9xBOC6l1QYgo3j70eUTEqhV4aXdTn8XVb23by4wsM96I2Zx15Zn 4QlU4s39BhVnRSeD5tec/VwRTySKxQyXDZ/9aTsBD8a+Orq26h0tLuiDB A==; X-CSE-ConnectionGUID: coan93BrSXa+r1NbaTlI7g== X-CSE-MsgGUID: UxvmOHa0RXyUh1u8CKcI3g== X-IronPort-AV: E=McAfee;i="6700,10204,11254"; a="31421821" X-IronPort-AV: E=Sophos;i="6.12,149,1728975600"; d="scan'208";a="31421821" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2024 18:00:41 -0800 X-CSE-ConnectionGUID: XrejwYrWTvqp2wzjgFTttQ== X-CSE-MsgGUID: J0GSHI57Som4OaXd/kYCnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,149,1728975600"; d="scan'208";a="88127746" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2024 18:00:35 -0800 Date: Tue, 12 Nov 2024 18:00:31 -0800 Message-ID: <85ed3fyjsw.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Sai Teja Pottumuttu Cc: Subject: Re: [PATCH i-g-t] tests/intel/xe_oa: Adapt tests for 128MB OA buffer size In-Reply-To: <20241112185901.2326879-1-sai.teja.pottumuttu@intel.com> References: <20241112185901.2326879-1-sai.teja.pottumuttu@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 Tue, 12 Nov 2024 10:59:01 -0800, Sai Teja Pottumuttu wrote: > > diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c > index 33e978a48..9ea7e73d2 100644 > --- a/tests/intel/xe_oa.c > +++ b/tests/intel/xe_oa.c > @@ -63,7 +63,7 @@ > #define PIPE_CONTROL_PPGTT_WRITE (0 << 2) > #define PIPE_CONTROL_GLOBAL_GTT_WRITE (1 << 2) > > -#define MAX_OA_BUF_SIZE (16 * 1024 * 1024) > +#define MAX_OA_BUF_SIZE (128 * 1024 * 1024) > #define OA_BUFFER_SIZE MAX_OA_BUF_SIZE > > #define RING_FORCE_TO_NONPRIV_ADDRESS_MASK 0x03fffffc > @@ -2364,7 +2364,7 @@ test_buffer_fill(const struct drm_xe_engine_class_instance *hwe) > .properties_ptr = to_user_pointer(properties), > }; > size_t report_size = get_oa_format(fmt).size; > - int buf_size = 65536 * report_size; > + int buf_size = OA_BUFFER_SIZE; > uint8_t *buf = malloc(buf_size); > int len; > size_t oa_buf_size = MAX_OA_BUF_SIZE; > @@ -2590,7 +2590,7 @@ test_enable_disable(const struct drm_xe_engine_class_instance *hwe) > .properties_ptr = to_user_pointer(properties), > }; > size_t report_size = get_oa_format(fmt).size; > - int buf_size = 65536 * report_size; > + int buf_size = OA_BUFFER_SIZE; > uint8_t *buf = malloc(buf_size); > size_t oa_buf_size = MAX_OA_BUF_SIZE; > int n_full_oa_reports = oa_buf_size / report_size; 1. Thanks for the patch. Though I still see this intermittent failure with https://patchwork.freedesktop.org/series/140390/: Starting subtest: oa-unit-concurrent-oa-buffer-read (xe_oa:13996) CRITICAL: Test assertion failure function test_blocking, file ../tests/intel/xe_oa.c:1994: (xe_oa:13996) CRITICAL: Failed assertion: kernel_ns <= (test_duration_ns / 100ull) Stack trace: #0 ../lib/igt_core.c:2051 __igt_fail_assert() #1 ../tests/intel/xe_oa.c:1991 test_blocking.constprop.0() #2 ../tests/intel/xe_oa.c:4258 __igt_unique____real_main4759() #3 ../tests/intel/xe_oa.c:4759 main() #4 ../sysdeps/nptl/libc_start_call_main.h:58 __libc_start_call_main() #5 ../csu/libc-start.c:128 __libc_start_main@@GLIBC_2.34() #6 [_start+0x25] child 0 failed with exit status 98 Subtest oa-unit-concurrent-oa-buffer-read failed. No log. Subtest oa-unit-concurrent-oa-buffer-read: FAIL (1.132s) I can also suggest the following general improvements in this area if you have time: 1. Get rid of MAX_OA_BUF_SIZE, just keep OA_BUFFER_SIZE 2. Rather than hardcoding OA_BUFFER_SIZE, define a global variable and populate it using DRM_XE_OBSERVATION_IOCTL_INFO (see include/drm-uapi/xe_drm.h). Populating the variable once, in a fixture, before the tests run should be sufficient. These can be done even now. If you do these, please do them in separate patches to keep the code reviews easy. Thanks. -- Ashutosh