* [PATCH igt] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
@ 2017-08-23 14:13 Chris Wilson
2017-08-23 14:33 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-08-23 15:09 ` [PATCH igt] " Daniel Vetter
0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-08-23 14:13 UTC (permalink / raw)
To: intel-gfx
These tests are not intended to exercise runtime pm, but the device
going to sleep in the middle of these tests can significantly slow them
down as the GTT mmapping is torn down and must be rebuilt. This can be a
major nuisance if the device autosuspends many times a second.
These tests differ from typical applications as they are not doing any
rendering or utilizing the display which would ordinarily keep the
device awake.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/gem_fence_thrash.c | 17 +++++++++++++++++
tests/gem_mmap_gtt.c | 15 ++++++++++++++-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index 3e1edb73..03e971aa 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -287,10 +287,27 @@ static int run_test(int threads_per_fence, void *f, int tiling,
return 0;
}
+static int wakeref_open(int device)
+{
+ int dir, fd;
+
+ dir = igt_debugfs_dir(device);
+ fd = openat(dir, "i915_wakeref_user", O_RDONLY);
+ close(dir);
+
+ return fd;
+}
+
igt_main
{
igt_skip_on_simulation();
+ igt_fixture {
+ int fd = drm_open_driver(DRIVER_INTEL);
+ wakeref_open(fd);
+ close(fd);
+ }
+
igt_subtest("bo-write-verify-none")
igt_assert(run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c
index 61c08406..fc44cfb5 100644
--- a/tests/gem_mmap_gtt.c
+++ b/tests/gem_mmap_gtt.c
@@ -864,6 +864,17 @@ run_without_prefault(int fd,
igt_enable_prefault();
}
+static int wakeref_open(int device)
+{
+ int dir, fd;
+
+ dir = igt_debugfs_dir(device);
+ fd = openat(dir, "i915_wakeref_user", O_RDONLY);
+ close(dir);
+
+ return fd;
+}
+
int fd;
igt_main
@@ -871,8 +882,10 @@ igt_main
if (igt_run_in_simulation())
OBJECT_SIZE = 1 * 1024 * 1024;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
+ wakeref_open(fd);
+ }
igt_subtest("basic")
test_access(fd);
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✓ Fi.CI.BAT: success for igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
2017-08-23 14:13 [PATCH igt] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep Chris Wilson
@ 2017-08-23 14:33 ` Patchwork
2017-08-23 15:09 ` [PATCH igt] " Daniel Vetter
1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-08-23 14:33 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
URL : https://patchwork.freedesktop.org/series/29215/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
42b42c99cd9d1b890807ae97cbd1c593396ae051 tests/Makefile.am: Wrap audio test with dedicated conditional
with latest DRM-Tip kernel build CI_DRM_2995
2964b2f40295 drm-tip: 2017y-08m-23d-13h-11m-32s UTC integration manifest
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> SKIP (fi-skl-x1585l) fdo#101781
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-n2820) fdo#101705
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:456s
fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:438s
fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:363s
fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:557s
fi-bwr-2160 total:279 pass:184 dwarn:0 dfail:0 fail:0 skip:95 time:253s
fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:526s
fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:529s
fi-byt-n2820 total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:528s
fi-elk-e7500 total:279 pass:230 dwarn:0 dfail:0 fail:0 skip:49 time:438s
fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:620s
fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:449s
fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:425s
fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:423s
fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:502s
fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:475s
fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:479s
fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:601s
fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:598s
fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:535s
fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:465s
fi-skl-6700k total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:480s
fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:491s
fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:434s
fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:488s
fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:547s
fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:408s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_87/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH igt] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
2017-08-23 14:13 [PATCH igt] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep Chris Wilson
2017-08-23 14:33 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-08-23 15:09 ` Daniel Vetter
2017-08-23 15:17 ` Chris Wilson
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2017-08-23 15:09 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Wed, Aug 23, 2017 at 03:13:55PM +0100, Chris Wilson wrote:
> These tests are not intended to exercise runtime pm, but the device
> going to sleep in the middle of these tests can significantly slow them
> down as the GTT mmapping is torn down and must be rebuilt. This can be a
> major nuisance if the device autosuspends many times a second.
>
> These tests differ from typical applications as they are not doing any
> rendering or utilizing the display which would ordinarily keep the
> device awake.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Can we just disable rpm while the test is on? Or at least set the
autosuspend timer to something huge like 60s, plus exit handler ofc.
Not as neat uabi as a fd-based wakeref, but has the upside that it doesn't
require a new kernel. Since we just discussed igt compat in another thread
...
Maybe should even extract that into lib/ from pm_rpm.
-Daniel
> ---
> tests/gem_fence_thrash.c | 17 +++++++++++++++++
> tests/gem_mmap_gtt.c | 15 ++++++++++++++-
> 2 files changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
> index 3e1edb73..03e971aa 100644
> --- a/tests/gem_fence_thrash.c
> +++ b/tests/gem_fence_thrash.c
> @@ -287,10 +287,27 @@ static int run_test(int threads_per_fence, void *f, int tiling,
> return 0;
> }
>
> +static int wakeref_open(int device)
> +{
> + int dir, fd;
> +
> + dir = igt_debugfs_dir(device);
> + fd = openat(dir, "i915_wakeref_user", O_RDONLY);
> + close(dir);
> +
> + return fd;
> +}
> +
> igt_main
> {
> igt_skip_on_simulation();
>
> + igt_fixture {
> + int fd = drm_open_driver(DRIVER_INTEL);
> + wakeref_open(fd);
> + close(fd);
> + }
> +
> igt_subtest("bo-write-verify-none")
> igt_assert(run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0);
>
> diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c
> index 61c08406..fc44cfb5 100644
> --- a/tests/gem_mmap_gtt.c
> +++ b/tests/gem_mmap_gtt.c
> @@ -864,6 +864,17 @@ run_without_prefault(int fd,
> igt_enable_prefault();
> }
>
> +static int wakeref_open(int device)
> +{
> + int dir, fd;
> +
> + dir = igt_debugfs_dir(device);
> + fd = openat(dir, "i915_wakeref_user", O_RDONLY);
> + close(dir);
> +
> + return fd;
> +}
> +
> int fd;
>
> igt_main
> @@ -871,8 +882,10 @@ igt_main
> if (igt_run_in_simulation())
> OBJECT_SIZE = 1 * 1024 * 1024;
>
> - igt_fixture
> + igt_fixture {
> fd = drm_open_driver(DRIVER_INTEL);
> + wakeref_open(fd);
> + }
>
> igt_subtest("basic")
> test_access(fd);
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH igt] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep
2017-08-23 15:09 ` [PATCH igt] " Daniel Vetter
@ 2017-08-23 15:17 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-08-23 15:17 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
Quoting Daniel Vetter (2017-08-23 16:09:50)
> On Wed, Aug 23, 2017 at 03:13:55PM +0100, Chris Wilson wrote:
> > These tests are not intended to exercise runtime pm, but the device
> > going to sleep in the middle of these tests can significantly slow them
> > down as the GTT mmapping is torn down and must be rebuilt. This can be a
> > major nuisance if the device autosuspends many times a second.
> >
> > These tests differ from typical applications as they are not doing any
> > rendering or utilizing the display which would ordinarily keep the
> > device awake.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Can we just disable rpm while the test is on? Or at least set the
> autosuspend timer to something huge like 60s, plus exit handler ofc.
>
> Not as neat uabi as a fd-based wakeref, but has the upside that it doesn't
> require a new kernel. Since we just discussed igt compat in another thread
> ...
We don't depend upon for correct test functionality, just to avoid
emulating the page-fault-of-doom. It's just a nice-to-have from that
pov. The fallback would be to take i915_forcewake_user instead. That's a
bit of an overkill, but both have the drawback of disabling some
important sanity checking by the runtime-pm infra. If we do accept that
some bludging is necessary to help bxt, we should at least add a couple
of tests before the wakeref to see if we can exercise those internal
checks.
> Maybe should even extract that into lib/ from pm_rpm.
I carefully stopped before the third instance.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-23 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 14:13 [PATCH igt] igt/gem_fence_thrash, gem_mmap_gtt: Don't let the device sleep Chris Wilson
2017-08-23 14:33 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-08-23 15:09 ` [PATCH igt] " Daniel Vetter
2017-08-23 15:17 ` Chris Wilson
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.