From: Matthew Brost <matthew.brost@intel.com> To: <intel-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org> Cc: daniele.ceraolospurio@intel.com, john.c.harrison@intel.com, tvrtko.ursulin@intel.com Subject: [PATCH 4/4] drm/i915/selftests: Set preemption timeout to zero in cancel reset test Date: Mon, 24 Jan 2022 07:01:57 -0800 [thread overview] Message-ID: <20220124150157.15758-5-matthew.brost@intel.com> (raw) In-Reply-To: <20220124150157.15758-1-matthew.brost@intel.com> Set the preemption timeout to zero to prove that request cancellation with preemption disabled works. Also this seals a race between a possible preemption and request cancellation. Signed-off-by: Matthew Brost <matthew.brost@intel.com> --- drivers/gpu/drm/i915/selftests/i915_request.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index 2a99dd7c2fe8a..e522e24129f9b 100644 --- a/drivers/gpu/drm/i915/selftests/i915_request.c +++ b/drivers/gpu/drm/i915/selftests/i915_request.c @@ -790,8 +790,9 @@ static int __cancel_completed(struct intel_engine_cs *engine) * wait for spinner to start, create a NOP request and submit it, cancel the * spinner, wait for spinner to complete and verify it failed with an error, * finally wait for NOP request to complete verify it succeeded without an - * error. Preemption timeout also reduced / restored so test runs in a timely - * maner. + * error. Preemption timeout also set to zero to ensure cancellation works with + * preemption disabled and to ensure the NOP request doesn't trigger a + * preemption on the spinner sealing a race between a preemption and the cancel. */ static int __cancel_reset(struct drm_i915_private *i915, struct intel_engine_cs *engine) @@ -807,7 +808,7 @@ static int __cancel_reset(struct drm_i915_private *i915, return 0; preempt_timeout_ms = engine->props.preempt_timeout_ms; - engine->props.preempt_timeout_ms = 100; + engine->props.preempt_timeout_ms = 0; if (igt_spinner_init(&spin, engine->gt)) goto out_restore; -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Brost <matthew.brost@intel.com> To: <intel-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org> Subject: [Intel-gfx] [PATCH 4/4] drm/i915/selftests: Set preemption timeout to zero in cancel reset test Date: Mon, 24 Jan 2022 07:01:57 -0800 [thread overview] Message-ID: <20220124150157.15758-5-matthew.brost@intel.com> (raw) In-Reply-To: <20220124150157.15758-1-matthew.brost@intel.com> Set the preemption timeout to zero to prove that request cancellation with preemption disabled works. Also this seals a race between a possible preemption and request cancellation. Signed-off-by: Matthew Brost <matthew.brost@intel.com> --- drivers/gpu/drm/i915/selftests/i915_request.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index 2a99dd7c2fe8a..e522e24129f9b 100644 --- a/drivers/gpu/drm/i915/selftests/i915_request.c +++ b/drivers/gpu/drm/i915/selftests/i915_request.c @@ -790,8 +790,9 @@ static int __cancel_completed(struct intel_engine_cs *engine) * wait for spinner to start, create a NOP request and submit it, cancel the * spinner, wait for spinner to complete and verify it failed with an error, * finally wait for NOP request to complete verify it succeeded without an - * error. Preemption timeout also reduced / restored so test runs in a timely - * maner. + * error. Preemption timeout also set to zero to ensure cancellation works with + * preemption disabled and to ensure the NOP request doesn't trigger a + * preemption on the spinner sealing a race between a preemption and the cancel. */ static int __cancel_reset(struct drm_i915_private *i915, struct intel_engine_cs *engine) @@ -807,7 +808,7 @@ static int __cancel_reset(struct drm_i915_private *i915, return 0; preempt_timeout_ms = engine->props.preempt_timeout_ms; - engine->props.preempt_timeout_ms = 100; + engine->props.preempt_timeout_ms = 0; if (igt_spinner_init(&spin, engine->gt)) goto out_restore; -- 2.34.1
next prev parent reply other threads:[~2022-01-24 15:07 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-24 15:01 [PATCH 0/4] Fix up request cancel Matthew Brost 2022-01-24 15:01 ` [Intel-gfx] " Matthew Brost 2022-01-24 15:01 ` [PATCH 1/4] drm/i915: Add request cancel low level trace point Matthew Brost 2022-01-24 15:01 ` [Intel-gfx] " Matthew Brost 2022-01-25 12:27 ` Tvrtko Ursulin 2022-01-25 16:39 ` Matthew Brost 2022-01-26 10:29 ` Tvrtko Ursulin 2022-01-24 15:01 ` [PATCH 2/4] drm/i915/guc: Cancel requests immediately Matthew Brost 2022-01-24 15:01 ` [Intel-gfx] " Matthew Brost 2022-01-26 18:58 ` John Harrison 2022-01-26 18:58 ` [Intel-gfx] " John Harrison 2022-01-26 20:12 ` Matthew Brost 2022-01-26 20:12 ` [Intel-gfx] " Matthew Brost 2022-01-24 15:01 ` [PATCH 3/4] drm/i915/execlists: Fix execlists request cancellation corner case Matthew Brost 2022-01-24 15:01 ` [Intel-gfx] " Matthew Brost 2022-01-25 15:27 ` Tvrtko Ursulin 2022-01-25 16:32 ` Matthew Brost 2022-01-26 10:38 ` Tvrtko Ursulin 2022-01-26 19:03 ` John Harrison 2022-01-26 19:03 ` [Intel-gfx] " John Harrison 2022-01-26 20:10 ` Matthew Brost 2022-01-26 20:10 ` [Intel-gfx] " Matthew Brost 2022-01-24 15:01 ` Matthew Brost [this message] 2022-01-24 15:01 ` [Intel-gfx] [PATCH 4/4] drm/i915/selftests: Set preemption timeout to zero in cancel reset test Matthew Brost 2022-01-24 22:52 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fix up request cancel (rev2) Patchwork 2022-01-24 22:54 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork 2022-01-24 23:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2022-01-25 4:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 2022-01-25 6:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fix up request cancel (rev3) Patchwork 2022-01-25 6:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork 2022-01-25 7:17 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220124150157.15758-5-matthew.brost@intel.com \ --to=matthew.brost@intel.com \ --cc=daniele.ceraolospurio@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=john.c.harrison@intel.com \ --cc=tvrtko.ursulin@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.