* [Intel-gfx] [PATCH i-g-t] igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915
@ 2018-08-07 15:44 Chris Wilson
2018-08-07 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-08 12:45 ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2018-08-07 15:44 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Link a vgem dmabuf into an i915 bo and then ask the i915 shrinker to
purge/invalidate its pages. This should establish the lockdep link from
the fs_reclaim shrinker section to whatever locks are used to
acquire/release dmabuf mappings; if any are required ofc.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
tests/prime_vgem.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index d886044a4..3b3dcc910 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -237,6 +237,32 @@ static void test_gtt(int vgem, int i915)
gem_close(vgem, scratch.handle);
}
+static void test_shrink(int vgem, int i915)
+{
+ struct vgem_bo scratch = {
+ .width = 1024,
+ .height = 1024,
+ .bpp = 32
+ };
+ int dmabuf;
+
+ vgem_create(vgem, &scratch);
+
+ dmabuf = prime_handle_to_fd(vgem, scratch.handle);
+ gem_close(vgem, scratch.handle);
+
+ scratch.handle = prime_fd_to_handle(i915, dmabuf);
+ close(dmabuf);
+
+ /* Populate the i915_bo->pages. */
+ gem_set_domain(i915, scratch.handle, I915_GEM_DOMAIN_GTT, 0);
+
+ /* Now evict them, establising the link from i915:shrinker to vgem. */
+ igt_drop_caches_set(i915, DROP_SHRINK_ALL);
+
+ gem_close(i915, scratch.handle);
+}
+
static bool is_coherent(int i915)
{
int val = 1; /* by default, we assume GTT is coherent, hence the test */
@@ -794,6 +820,9 @@ igt_main
igt_subtest("basic-gtt")
test_gtt(vgem, i915);
+ igt_subtest("shrink")
+ test_shrink(vgem, i915);
+
igt_subtest("coherency-gtt")
test_gtt_interleaved(vgem, i915);
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915
2018-08-07 15:44 [Intel-gfx] [PATCH i-g-t] igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915 Chris Wilson
@ 2018-08-07 16:10 ` Patchwork
2018-08-08 12:45 ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-08-07 16:10 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915
URL : https://patchwork.freedesktop.org/series/47821/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4612 -> IGTPW_1686 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/47821/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1686 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_workarounds:
fi-cnl-psr: PASS -> DMESG-FAIL (fdo#107292)
fi-kbl-7560u: PASS -> DMESG-FAIL (fdo#107292)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
{fi-byt-clapper}: PASS -> FAIL (fdo#107362)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
{fi-byt-clapper}: PASS -> FAIL (fdo#103191, fdo#107362)
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@drv_selftest@live_workarounds:
{fi-bsw-kefka}: DMESG-FAIL (fdo#107292) -> PASS
igt@kms_chamelium@common-hpd-after-suspend:
fi-skl-6700k2: INCOMPLETE (k.org#199541, fdo#105524, fdo#104108) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-FAIL (fdo#106103, fdo#102614) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105524 https://bugs.freedesktop.org/show_bug.cgi?id=105524
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
k.org#199541 https://bugzilla.kernel.org/show_bug.cgi?id=199541
== Participating hosts (53 -> 48) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* IGT: IGT_4586 -> IGTPW_1686
CI_DRM_4612: 54b418b10dad143d1bbe7708de5bbf3344164303 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1686: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1686/
IGT_4586: 57caaf440520e397403d898e1d3f1d65ef7b79e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@prime_vgem@shrink
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1686/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915
2018-08-07 15:44 [Intel-gfx] [PATCH i-g-t] igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915 Chris Wilson
2018-08-07 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-08-08 12:45 ` Tvrtko Ursulin
1 sibling, 0 replies; 3+ messages in thread
From: Tvrtko Ursulin @ 2018-08-08 12:45 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 07/08/2018 16:44, Chris Wilson wrote:
> Link a vgem dmabuf into an i915 bo and then ask the i915 shrinker to
> purge/invalidate its pages. This should establish the lockdep link from
> the fs_reclaim shrinker section to whatever locks are used to
> acquire/release dmabuf mappings; if any are required ofc.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> ---
> tests/prime_vgem.c | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
> index d886044a4..3b3dcc910 100644
> --- a/tests/prime_vgem.c
> +++ b/tests/prime_vgem.c
> @@ -237,6 +237,32 @@ static void test_gtt(int vgem, int i915)
> gem_close(vgem, scratch.handle);
> }
>
> +static void test_shrink(int vgem, int i915)
> +{
> + struct vgem_bo scratch = {
> + .width = 1024,
> + .height = 1024,
> + .bpp = 32
> + };
> + int dmabuf;
> +
> + vgem_create(vgem, &scratch);
> +
> + dmabuf = prime_handle_to_fd(vgem, scratch.handle);
> + gem_close(vgem, scratch.handle);
> +
> + scratch.handle = prime_fd_to_handle(i915, dmabuf);
> + close(dmabuf);
> +
> + /* Populate the i915_bo->pages. */
> + gem_set_domain(i915, scratch.handle, I915_GEM_DOMAIN_GTT, 0);
> +
> + /* Now evict them, establising the link from i915:shrinker to vgem. */
> + igt_drop_caches_set(i915, DROP_SHRINK_ALL);
> +
> + gem_close(i915, scratch.handle);
> +}
> +
> static bool is_coherent(int i915)
> {
> int val = 1; /* by default, we assume GTT is coherent, hence the test */
> @@ -794,6 +820,9 @@ igt_main
> igt_subtest("basic-gtt")
> test_gtt(vgem, i915);
>
> + igt_subtest("shrink")
> + test_shrink(vgem, i915);
> +
> igt_subtest("coherency-gtt")
> test_gtt_interleaved(vgem, i915);
>
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-08 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-07 15:44 [Intel-gfx] [PATCH i-g-t] igt/prime_vgem: Ask the shrinker to purge a vgem bo from inside i915 Chris Wilson
2018-08-07 16:10 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-08 12:45 ` [Intel-gfx] [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).