All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] lib: Ask the kernel to quiescent the GPU
@ 2017-09-26  9:02 Chris Wilson
  2017-09-26 10:11 ` Petri Latvala
  2017-09-26 18:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-09-26  9:02 UTC (permalink / raw)
  To: intel-gfx

Since the introduction of debugfs/i915_drop_caches, we have offered the
ability to wait upon all outstanding batches. This is more efficient and
less error prone (one example is the use of context priorities, we have
to idle at the lowest in order not to jump over any low priority tasks
we want to wait upon) than trying to do it all in userspace. Though we
could if we wanted to, it's just easier to use the existing facility
designed for the purpose -- that we were already partially using!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/drmtest.c | 28 +---------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 8a07152c..4ae023d7 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -159,35 +159,9 @@ static bool has_known_intel_chipset(int fd)
  */
 void gem_quiescent_gpu(int fd)
 {
-	uint32_t bbe = MI_BATCH_BUFFER_END;
-	struct drm_i915_gem_execbuffer2 execbuf;
-	struct drm_i915_gem_exec_object2 obj;
-	unsigned ring;
-
 	igt_terminate_spin_batches();
 
-	memset(&obj, 0, sizeof(obj));
-	obj.handle = gem_create(fd, 4096);
-	gem_write(fd, obj.handle, 0, &bbe, sizeof(&bbe));
-
-	memset(&execbuf, 0, sizeof(execbuf));
-	execbuf.buffers_ptr = to_user_pointer(&obj);
-	execbuf.buffer_count = 1;
-
-	for (ring = 0; ring < 1<<6; ring++) {
-		execbuf.flags = ring;
-		__gem_execbuf(fd, &execbuf);
-	}
-
-	if (gem_has_bsd2(fd)) {
-		execbuf.flags = I915_EXEC_BSD | (2 << 13);
-		__gem_execbuf(fd, &execbuf);
-	}
-
-	gem_sync(fd, obj.handle);
-	gem_close(fd, obj.handle);
-
-	igt_drop_caches_set(fd, DROP_RETIRE | DROP_FREED);
+	igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE | DROP_FREED);
 }
 
 /**
-- 
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

* Re: [PATCH igt] lib: Ask the kernel to quiescent the GPU
  2017-09-26  9:02 [PATCH igt] lib: Ask the kernel to quiescent the GPU Chris Wilson
@ 2017-09-26 10:11 ` Petri Latvala
  2017-09-26 18:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Petri Latvala @ 2017-09-26 10:11 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Sep 26, 2017 at 10:02:02AM +0100, Chris Wilson wrote:
> Since the introduction of debugfs/i915_drop_caches, we have offered the
> ability to wait upon all outstanding batches. This is more efficient and
> less error prone (one example is the use of context priorities, we have
> to idle at the lowest in order not to jump over any low priority tasks
> we want to wait upon) than trying to do it all in userspace. Though we
> could if we wanted to, it's just easier to use the existing facility
> designed for the purpose -- that we were already partially using!
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

After a discussion on IRC regarding kernel backwards compatibility of
DROP_ACTIVE, this LGTM.

Reviewed-by: Petri Latvala <petri.latvala@intel.com>



> ---
>  lib/drmtest.c | 28 +---------------------------
>  1 file changed, 1 insertion(+), 27 deletions(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 8a07152c..4ae023d7 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -159,35 +159,9 @@ static bool has_known_intel_chipset(int fd)
>   */
>  void gem_quiescent_gpu(int fd)
>  {
> -	uint32_t bbe = MI_BATCH_BUFFER_END;
> -	struct drm_i915_gem_execbuffer2 execbuf;
> -	struct drm_i915_gem_exec_object2 obj;
> -	unsigned ring;
> -
>  	igt_terminate_spin_batches();
>  
> -	memset(&obj, 0, sizeof(obj));
> -	obj.handle = gem_create(fd, 4096);
> -	gem_write(fd, obj.handle, 0, &bbe, sizeof(&bbe));
> -
> -	memset(&execbuf, 0, sizeof(execbuf));
> -	execbuf.buffers_ptr = to_user_pointer(&obj);
> -	execbuf.buffer_count = 1;
> -
> -	for (ring = 0; ring < 1<<6; ring++) {
> -		execbuf.flags = ring;
> -		__gem_execbuf(fd, &execbuf);
> -	}
> -
> -	if (gem_has_bsd2(fd)) {
> -		execbuf.flags = I915_EXEC_BSD | (2 << 13);
> -		__gem_execbuf(fd, &execbuf);
> -	}
> -
> -	gem_sync(fd, obj.handle);
> -	gem_close(fd, obj.handle);
> -
> -	igt_drop_caches_set(fd, DROP_RETIRE | DROP_FREED);
> +	igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE | DROP_FREED);
>  }
>  
>  /**
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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

* ✗ Fi.CI.BAT: failure for lib: Ask the kernel to quiescent the GPU
  2017-09-26  9:02 [PATCH igt] lib: Ask the kernel to quiescent the GPU Chris Wilson
  2017-09-26 10:11 ` Petri Latvala
@ 2017-09-26 18:13 ` Patchwork
  2017-09-26 20:07   ` Chris Wilson
  1 sibling, 1 reply; 4+ messages in thread
From: Patchwork @ 2017-09-26 18:13 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: lib: Ask the kernel to quiescent the GPU
URL   : https://patchwork.freedesktop.org/series/30890/
State : failure

== Summary ==

IGT patchset tested on top of latest successful build
2885b10f99b4beeb046e75af8b8488c229f629d3 igt/gem_exec_schedule: Ignore set-priority failures on old kernels

with latest DRM-Tip kernel build CI_DRM_3140
c4c623d58e38 drm-tip: 2017y-09m-26d-16h-37m-12s UTC integration manifest

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102514
Test gem_sync:
        Subgroup basic-all:
                pass       -> DMESG-FAIL (fi-blb-e6850)
                pass       -> DMESG-FAIL (fi-pnv-d510)
Test gem_workarounds:
        Subgroup basic-read:
                pass       -> FAIL       (fi-bdw-5557u)
                pass       -> FAIL       (fi-bdw-gvtdvm)
                pass       -> FAIL       (fi-bsw-n3050)
                pass       -> FAIL       (fi-skl-6700k)
                pass       -> FAIL       (fi-skl-6770hq)
                pass       -> FAIL       (fi-skl-gvtdvm)
                pass       -> FAIL       (fi-bxt-j4205)
                pass       -> FAIL       (fi-kbl-7500u)
                pass       -> FAIL       (fi-kbl-7560u)
                pass       -> FAIL       (fi-kbl-r)
                pass       -> FAIL       (fi-glk-1)
                pass       -> FAIL       (fi-cfl-s)
Test pm_rpm:
        Subgroup basic-rte:
                dmesg-warn -> PASS       (fi-cfl-s) fdo#102294

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294

fi-bdw-5557u     total:289  pass:267  dwarn:0   dfail:0   fail:1   skip:21  time:443s
fi-bdw-gvtdvm    total:289  pass:264  dwarn:0   dfail:0   fail:1   skip:24  time:465s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:1   fail:0   skip:64  time:436s
fi-bsw-n3050     total:289  pass:242  dwarn:0   dfail:0   fail:1   skip:46  time:514s
fi-bwr-2160      total:289  pass:184  dwarn:0   dfail:0   fail:0   skip:105 time:279s
fi-bxt-j4205     total:289  pass:259  dwarn:0   dfail:0   fail:1   skip:29  time:498s
fi-byt-j1900     total:289  pass:254  dwarn:1   dfail:0   fail:0   skip:34  time:492s
fi-byt-n2820     total:289  pass:250  dwarn:1   dfail:0   fail:0   skip:38  time:486s
fi-cfl-s         total:289  pass:222  dwarn:34  dfail:0   fail:1   skip:32  time:536s
fi-cnl-y         total:289  pass:256  dwarn:0   dfail:0   fail:6   skip:27  time:655s
fi-elk-e7500     total:289  pass:230  dwarn:0   dfail:0   fail:0   skip:59  time:418s
fi-glk-1         total:289  pass:259  dwarn:0   dfail:0   fail:1   skip:29  time:561s
fi-hsw-4770      total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:426s
fi-hsw-4770r     total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:404s
fi-ilk-650       total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:433s
fi-ivb-3520m     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:484s
fi-ivb-3770      total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:472s
fi-kbl-7500u     total:289  pass:262  dwarn:1   dfail:0   fail:2   skip:24  time:457s
fi-kbl-7560u     total:289  pass:269  dwarn:0   dfail:0   fail:1   skip:19  time:577s
fi-kbl-r         total:289  pass:261  dwarn:0   dfail:0   fail:1   skip:27  time:583s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:1   fail:0   skip:65  time:553s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-skl-6700k     total:289  pass:264  dwarn:0   dfail:0   fail:1   skip:24  time:743s
fi-skl-6770hq    total:289  pass:268  dwarn:0   dfail:0   fail:1   skip:20  time:491s
fi-skl-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:1   skip:23  time:469s
fi-snb-2520m     total:289  pass:251  dwarn:0   dfail:0   fail:0   skip:38  time:563s
fi-snb-2600      total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:416s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_252/
_______________________________________________
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: ✗ Fi.CI.BAT: failure for lib: Ask the kernel to quiescent the GPU
  2017-09-26 18:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-09-26 20:07   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-09-26 20:07 UTC (permalink / raw)
  To: Patchwork; +Cc: intel-gfx

Quoting Patchwork (2017-09-26 19:13:26)
> == Series Details ==
> 
> Series: lib: Ask the kernel to quiescent the GPU
> URL   : https://patchwork.freedesktop.org/series/30890/
> State : failure
> 
> == Summary ==
> 
> IGT patchset tested on top of latest successful build
> 2885b10f99b4beeb046e75af8b8488c229f629d3 igt/gem_exec_schedule: Ignore set-priority failures on old kernels
> 
> with latest DRM-Tip kernel build CI_DRM_3140
> c4c623d58e38 drm-tip: 2017y-09m-26d-16h-37m-12s UTC integration manifest
> 
> Test chamelium:
>         Subgroup dp-crc-fast:
>                 pass       -> FAIL       (fi-kbl-7500u) fdo#102514
> Test gem_sync:
>         Subgroup basic-all:
>                 pass       -> DMESG-FAIL (fi-blb-e6850)
>                 pass       -> DMESG-FAIL (fi-pnv-d510)
> Test gem_workarounds:
>         Subgroup basic-read:
>                 pass       -> FAIL       (fi-bdw-5557u)
>                 pass       -> FAIL       (fi-bdw-gvtdvm)
>                 pass       -> FAIL       (fi-bsw-n3050)
>                 pass       -> FAIL       (fi-skl-6700k)
>                 pass       -> FAIL       (fi-skl-6770hq)
>                 pass       -> FAIL       (fi-skl-gvtdvm)
>                 pass       -> FAIL       (fi-bxt-j4205)
>                 pass       -> FAIL       (fi-kbl-7500u)
>                 pass       -> FAIL       (fi-kbl-7560u)
>                 pass       -> FAIL       (fi-kbl-r)
>                 pass       -> FAIL       (fi-glk-1)
>                 pass       -> FAIL       (fi-cfl-s)

It is using quiescent_gpu to load a context. Abuse of the old
implementation. Furthermore the test is bogus, since it should be
executing those reads from inside the context. But we've known that
since its inception.
-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-09-26 20:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-26  9:02 [PATCH igt] lib: Ask the kernel to quiescent the GPU Chris Wilson
2017-09-26 10:11 ` Petri Latvala
2017-09-26 18:13 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-09-26 20:07   ` 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.