From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0EE2F10E8B4 for ; Fri, 8 Sep 2023 13:29:07 +0000 (UTC) From: Marcin Bernatowicz To: igt-dev@lists.freedesktop.org Date: Fri, 8 Sep 2023 12:54:50 +0000 Message-Id: <20230908125454.2670405-1-marcin.bernatowicz@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v4 0/4] lib/xe_spin: introduced fixed duration xe_spin List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Introduced struct xe_spin_opts for xe_spin initialization, adjusted tests to new xe_spin_init signature. Extended spinner with fixed duration capability. It allows to prepare fixed duration (ex. 10ms) workloads and take workloads/second measurements, a handy utility for scheduling tests. Basic test for xe_spin with fixed duration. v2: - added asserts in div64_u64_round_up, duration_to_ctx_ticks, simplified loop_addr (Zbyszek) - added xe_spin_init_opts macro (Zbyszek) - corrected patch title (Kamil) - Added assert for expected spinner duration. (Zbyszek) A median of 5x100ms spins duration is computed, which should satisfy CI runs, although better accuracy is achieved with disabled logging (echo 0 > /sys/module/drm/parameters/debug). v3: - extracted xe_spin_opts to separate patch (Kamil) - div64_u64_round_up assert on overflow (Kamil) - enum indentation cleanup in xe_spin.c (Kamil) v4: - checkpatch fixes (Kamil) - corrected variables readability in xe_spin_fixed_duration (Zbyszek) Signed-off-by: Marcin Bernatowicz Marcin Bernatowicz (4): lib/xe_spin: xe_spin_opts for xe_spin initialization lib/xe_spin: fixed duration xe_spin capability tests/xe_spin_batch: spin-fixed-duration lib/xe_spin.c: fixed checkpatch issue lib/xe/xe_spin.c | 126 ++++++++++++++++++++++++++++----- lib/xe/xe_spin.h | 27 ++++++- tests/intel/xe_dma_buf_sync.c | 6 +- tests/intel/xe_exec_balancer.c | 9 ++- tests/intel/xe_exec_reset.c | 24 ++++--- tests/intel/xe_exec_threads.c | 7 +- tests/intel/xe_spin_batch.c | 72 +++++++++++++++++++ tests/intel/xe_vm.c | 7 +- 8 files changed, 233 insertions(+), 45 deletions(-) -- 2.30.2