diff mbox series

[v4,1/1] i915_pm_rpm: remove gem-execbuf-stress-extra-wait because same as gem-execbuf-stress

Message ID ff525e5474607b1c8e148996199c75c5fd76c36f.1553012655.git.caz.yokoyama@intel.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/1] i915_pm_rpm: remove gem-execbuf-stress-extra-wait because same as gem-execbuf-stress | expand

Commit Message

Yokoyama, Caz March 19, 2019, 4:25 p.m. UTC
Extra 5sec delay does not add any value more than gem-execbuf-stress.
It waits until suspend state after a job is added by gem_execbuf().
There is no need to do more when GPU becomes suspended state.
I confirm this by looking at pm_runtime_force_suspend() which exits
on suspend state.

Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/i915_pm_rpm.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Chris Wilson March 19, 2019, 4:36 p.m. UTC | #1
Quoting Caz Yokoyama (2019-03-19 16:25:29)
> Extra 5sec delay does not add any value more than gem-execbuf-stress.
> It waits until suspend state after a job is added by gem_execbuf().
> There is no need to do more when GPU becomes suspended state.
> I confirm this by looking at pm_runtime_force_suspend() which exits
> on suspend state.

I agree that from the driver point of view, there is no difference. But
from a hardware? Does that justify an extra level of paranoia? Probably.
So what harm is there that we have a test for that extra level of
paranoia for the developer to run? i.e. why run this test unless you
want to check, and if you aren't running it, where's the cost?
-Chris
Yokoyama, Caz March 19, 2019, 4:41 p.m. UTC | #2
Please disregard. Wrong address. Sorry.
-caz

-----Original Message-----
From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of Caz Yokoyama
Sent: Tuesday, March 19, 2019 09:25
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v4 1/1] i915_pm_rpm: remove gem-execbuf-stress-extra-wait because same as gem-execbuf-stress

Extra 5sec delay does not add any value more than gem-execbuf-stress.
It waits until suspend state after a job is added by gem_execbuf().
There is no need to do more when GPU becomes suspended state.
I confirm this by looking at pm_runtime_force_suspend() which exits on suspend state.

Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/i915_pm_rpm.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c index be296f52..9a91ca0a 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1338,12 +1338,13 @@ static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
 	for (i = 0; i < rounds; i++) {
 		gem_execbuf(drm_fd, &execbuf);
 
-		if (wait_flags & WAIT_STATUS)
+		if (wait_flags & WAIT_STATUS) {
+			/* clean up idle work */
+			igt_drop_caches_set(drm_fd, DROP_IDLE);
 			igt_assert(wait_for_suspended());
+		}
 		if (wait_flags & WAIT_PC8_RES)
 			igt_assert(pc8_plus_residency_changed(30));
-		if (wait_flags & WAIT_EXTRA)
-			sleep(5);
 	}
 
 	gem_close(drm_fd, handle);
@@ -2083,8 +2084,6 @@ int main(int argc, char *argv[])
 		gem_execbuf_stress_subtest(rounds, WAIT_STATUS);
 	igt_subtest("gem-execbuf-stress-pc8")
 		gem_execbuf_stress_subtest(rounds, WAIT_PC8_RES);
-	igt_subtest("gem-execbuf-stress-extra-wait")
-		gem_execbuf_stress_subtest(rounds, WAIT_STATUS | WAIT_EXTRA);
 
 	/* power-wake reference tests */
 	igt_subtest("pm-tiling")
--
2.17.1
diff mbox series

Patch

diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index be296f52..9a91ca0a 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1338,12 +1338,13 @@  static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
 	for (i = 0; i < rounds; i++) {
 		gem_execbuf(drm_fd, &execbuf);
 
-		if (wait_flags & WAIT_STATUS)
+		if (wait_flags & WAIT_STATUS) {
+			/* clean up idle work */
+			igt_drop_caches_set(drm_fd, DROP_IDLE);
 			igt_assert(wait_for_suspended());
+		}
 		if (wait_flags & WAIT_PC8_RES)
 			igt_assert(pc8_plus_residency_changed(30));
-		if (wait_flags & WAIT_EXTRA)
-			sleep(5);
 	}
 
 	gem_close(drm_fd, handle);
@@ -2083,8 +2084,6 @@  int main(int argc, char *argv[])
 		gem_execbuf_stress_subtest(rounds, WAIT_STATUS);
 	igt_subtest("gem-execbuf-stress-pc8")
 		gem_execbuf_stress_subtest(rounds, WAIT_PC8_RES);
-	igt_subtest("gem-execbuf-stress-extra-wait")
-		gem_execbuf_stress_subtest(rounds, WAIT_STATUS | WAIT_EXTRA);
 
 	/* power-wake reference tests */
 	igt_subtest("pm-tiling")