Re: [Intel-gfx] [PATCH v10 2/2] drm/i915: Allow user to set cache at BO creation
On 2023-05-18 22:11:03, wrote: > From: Fei Yang > > To comply with the design that buffer objects shall have immutable > cache setting through out their life cycle, {set, get}_caching ioctl's > are no longer supported from MTL onward. With that change caching > policy can only be set at object creation time. The current code > applies a default (platform dependent) cache setting for all objects. > However this is not optimal for performance tuning. The patch extends > the existing gem_create uAPI to let user set PAT index for the object > at creation time. > The new extension is platform independent, so UMD's can switch to using > this extension for older platforms as well, while {set, get}_caching are > still supported on these legacy paltforms for compatibility reason. > > Test igt@gem_create@create_ext_set_pat posted at > https://patchwork.freedesktop.org/series/117695/ > > Tested with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878 > > Signed-off-by: Fei Yang > Cc: Chris Wilson > Cc: Matt Roper > Cc: Andi Shyti > Reviewed-by: Andi Shyti > Acked-by: Jordan Justen Nevertheless, I'm still disappointed my suggestion was so quickly shot down. I tried to look over our usage Mesa of i915 extensions, and found this: I915_GEM_CREATE_EXT_MEMORY_REGIONS: * If DRM_I915_QUERY_MEMORY_REGIONS is found I915_GEM_CREATE_EXT_PROTECTED_CONTENT: * Probed via the current "robust" method. Resulted in 8s driver startup delay in some bad scenarios. * Will be guarded by I915_PARAM_PXP_STATUS when available in future I915_CONTEXT_CREATE_EXT_SETPARAM (I915_CONTEXT_PARAM_ENGINES): * If DRM_I915_QUERY_ENGINE_INFO is found I915_GEM_CREATE_EXT_SET_PAT: * When platform is mtl or newer I think we will continue to try to find workarounds that imply the extension's existence, but it could be nice to have a generic way to find out what extensions the kernel knows about. -Jordan
Re: [Intel-gfx] [PATCH] i915/perf: Avoid reading OA reports before they land
Hi Umesh, Looks like there is still a problem with the if block moving the stream->oa_buffer.tail forward. An application not doing any polling would still run into the same problem. If I understand correctly this change, it means the time based workaround doesn't work. We need to actually check the report's content before moving the software tracked tail. If that's the case, they maybe we should just delete that code. -Lionel On 20/05/2023 01:56, Umesh Nerlige Ramappa wrote: On DG2, capturing OA reports while running heavy render workloads sometimes results in invalid OA reports where 64-byte chunks inside reports have stale values. Under memory pressure, high OA sampling rates (13.3 us) and heavy render workload, occassionally, the OA HW TAIL pointer does not progress as fast as the sampling rate. When these glitches occur, the TAIL pointer takes approx. 200us to progress. While this is expected behavior from the HW perspective, invalid reports are not expected. In oa_buffer_check_unlocked(), when we execute the if condition, we are updating the oa_buffer.tail to the aging tail and then setting pollin based on this tail value, however, we do not have a chance to rewind and validate the reports prior to setting pollin. The validation happens in a subsequent call to oa_buffer_check_unlocked(). If a read occurs before this validation, then we end up reading reports up until this oa_buffer.tail value which includes invalid reports. Though found on DG2, this affects all platforms. Set the pollin only in the else condition in oa_buffer_check_unlocked. Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7484 Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7757 Signed-off-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/i915/i915_perf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 19d5652300ee..61536e3c4ac9 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -545,7 +545,7 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream) u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma); int report_size = stream->oa_buffer.format->size; unsigned long flags; - bool pollin; + bool pollin = false; u32 hw_tail; u64 now; u32 partial_report_size; @@ -620,10 +620,10 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream) stream->oa_buffer.tail = gtt_offset + tail; stream->oa_buffer.aging_tail = gtt_offset + hw_tail; stream->oa_buffer.aging_timestamp = now; - } - pollin = OA_TAKEN(stream->oa_buffer.tail - gtt_offset, - stream->oa_buffer.head - gtt_offset) >= report_size; + pollin = OA_TAKEN(stream->oa_buffer.tail - gtt_offset, + stream->oa_buffer.head - gtt_offset) >= report_size; + } spin_unlock_irqrestore(>oa_buffer.ptr_lock, flags);
[Intel-gfx] ✗ Fi.CI.IGT: failure for i915/perf: Avoid reading OA reports before they land
== Series Details == Series: i915/perf: Avoid reading OA reports before they land URL : https://patchwork.freedesktop.org/series/118054/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13169_full -> Patchwork_118054v1_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_118054v1_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_118054v1_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Participating hosts (7 -> 7) -- No changes in participating hosts Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_118054v1_full: ### IGT changes ### Possible regressions * igt@perf@gen12-group-concurrent-oa-buffer-read: - shard-apl: [PASS][1] -> [FAIL][2] +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-apl1/igt@p...@gen12-group-concurrent-oa-buffer-read.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-apl4/igt@p...@gen12-group-concurrent-oa-buffer-read.html Known issues Here are the changes found in Patchwork_118054v1_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_fair@basic-deadline: - shard-glk: [PASS][3] -> [FAIL][4] ([i915#2846]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-glk2/igt@gem_exec_f...@basic-deadline.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-glk8/igt@gem_exec_f...@basic-deadline.html * igt@kms_color@ctm-0-75@pipe-b-vga-1: - shard-snb: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#4579]) +14 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-snb2/igt@kms_color@ctm-0...@pipe-b-vga-1.html * igt@kms_flip@2x-nonexisting-fb: - shard-snb: NOTRUN -> [SKIP][6] ([fdo#109271]) +16 similar issues [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-snb5/igt@kms_f...@2x-nonexisting-fb.html Possible fixes * igt@gem_eio@hibernate: - {shard-tglu}: [ABORT][7] ([i915#7975] / [i915#8213] / [i915#8398]) -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-tglu-10/igt@gem_...@hibernate.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-tglu-2/igt@gem_...@hibernate.html * igt@gem_exec_fair@basic-pace@rcs0: - {shard-rkl}:[FAIL][9] ([i915#2842]) -> [PASS][10] +2 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-rkl-1/igt@gem_exec_fair@basic-p...@rcs0.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-rkl-3/igt@gem_exec_fair@basic-p...@rcs0.html * igt@gem_lmem_swapping@smem-oom@lmem0: - {shard-dg1}:[TIMEOUT][11] ([i915#5493]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-dg1-12/igt@gem_lmem_swapping@smem-...@lmem0.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-dg1-17/igt@gem_lmem_swapping@smem-...@lmem0.html * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a: - {shard-rkl}:[SKIP][13] ([i915#1937] / [i915#4579]) -> [PASS][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-rkl-2/igt@i915_pm_lpsp@kms-l...@kms-lpsp-hdmi-a.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-rkl-7/igt@i915_pm_lpsp@kms-l...@kms-lpsp-hdmi-a.html * igt@i915_pm_rc6_residency@rc6-idle@vcs0: - {shard-dg1}:[FAIL][15] ([i915#3591]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-dg1-18/igt@i915_pm_rc6_residency@rc6-i...@vcs0.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-dg1-18/igt@i915_pm_rc6_residency@rc6-i...@vcs0.html * igt@i915_suspend@basic-s3-without-i915: - {shard-rkl}:[FAIL][17] ([fdo#103375]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-rkl-6/igt@i915_susp...@basic-s3-without-i915.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-rkl-7/igt@i915_susp...@basic-s3-without-i915.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-apl: [FAIL][19] ([i915#2346]) -> [PASS][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/shard-apl4/igt@kms_cursor_leg...@flip-vs-cursor-atomic-transitions.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/shard-apl2/igt@kms_cursor_leg...@flip-vs-cursor-atomic-transitions.html * igt@kms_draw_crc@draw-method-blt@xrgb2101010-ytiled: - shard-glk: [DMESG-WARN][21]
[Intel-gfx] ✓ Fi.CI.BAT: success for i915/perf: Avoid reading OA reports before they land
== Series Details == Series: i915/perf: Avoid reading OA reports before they land URL : https://patchwork.freedesktop.org/series/118054/ State : success == Summary == CI Bug Log - changes from CI_DRM_13169 -> Patchwork_118054v1 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/index.html Participating hosts (36 -> 35) -- Missing(1): fi-snb-2520m Known issues Here are the changes found in Patchwork_118054v1 that come from known issues: ### IGT changes ### Issues hit * igt@i915_pm_backlight@basic-brightness@edp-1: - bat-rplp-1: NOTRUN -> [ABORT][1] ([i915#7077]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/bat-rplp-1/igt@i915_pm_backlight@basic-brightn...@edp-1.html * igt@i915_selftest@live@reset: - bat-rpls-1: NOTRUN -> [ABORT][2] ([i915#4983] / [i915#7461] / [i915#8347] / [i915#8384]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/bat-rpls-1/igt@i915_selftest@l...@reset.html * igt@kms_pipe_crc_basic@suspend-read-crc: - fi-hsw-4770:NOTRUN -> [SKIP][3] ([fdo#109271]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/fi-hsw-4770/igt@kms_pipe_crc_ba...@suspend-read-crc.html Possible fixes * igt@i915_selftest@live@requests: - bat-rpls-1: [ABORT][4] ([i915#4983] / [i915#7911] / [i915#7920]) -> [PASS][5] [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/bat-rpls-1/igt@i915_selftest@l...@requests.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/bat-rpls-1/igt@i915_selftest@l...@requests.html Warnings * igt@kms_setmode@basic-clone-single-crtc: - bat-rplp-1: [ABORT][6] ([i915#4579] / [i915#8260]) -> [SKIP][7] ([i915#3555] / [i915#4579]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13169/bat-rplp-1/igt@kms_setm...@basic-clone-single-crtc.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/bat-rplp-1/igt@kms_setm...@basic-clone-single-crtc.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579 [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983 [i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077 [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461 [i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872 [i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911 [i915#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920 [i915#7953]: https://gitlab.freedesktop.org/drm/intel/issues/7953 [i915#8260]: https://gitlab.freedesktop.org/drm/intel/issues/8260 [i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347 [i915#8384]: https://gitlab.freedesktop.org/drm/intel/issues/8384 Build changes - * Linux: CI_DRM_13169 -> Patchwork_118054v1 CI-20190529: 20190529 CI_DRM_13169: f533234d40e8f5b8599bd5bc97fa8e30384aec03 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_7297: 0f0754413f14abe2fe6434fd0873c158dbc47ec9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_118054v1: f533234d40e8f5b8599bd5bc97fa8e30384aec03 @ git://anongit.freedesktop.org/gfx-ci/linux ### Linux commits bd939ad4e8fd i915/perf: Avoid reading OA reports before they land == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118054v1/index.html