From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org, Chris Wilson <chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH i-g-t] i915/gem_exec_capture: Trim the blocking workload Date: Fri, 27 Nov 2020 21:29:22 +0000 [thread overview] Message-ID: <20201127212922.865538-1-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20201127212605.860635-1-chris@chris-wilson.co.uk> While we want the capture to last long enough to delay the concurrent client, we don't want to wait forever for the capture to complete to proceed with the testing. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2559 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_exec_capture.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c index cb0d3151b..3da78d632 100644 --- a/tests/i915/gem_exec_capture.c +++ b/tests/i915/gem_exec_capture.c @@ -21,6 +21,7 @@ * IN THE SOFTWARE. */ +#include <sys/poll.h> #include <zlib.h> #include "i915/gem.h" @@ -524,6 +525,7 @@ static void prioinv(int fd, int dir, unsigned ring, const char *name) gtt, ram); count = min(gtt, ram) / 4; + count = min(count, 256); /* Keep the duration within reason */ igt_require(count > 1); intel_require_memory(count, size, CHECK_RAM); @@ -535,18 +537,26 @@ static void prioinv(int fd, int dir, unsigned ring, const char *name) igt_assert(pipe(link) == 0); igt_fork(child, 1) { fd = gem_reopen_driver(fd); - igt_debug("Submitting large hang + capture\n"); + igt_debug("Submitting large capture [%ld x %dMiB objects]\n", + count, (int)(size >> 20)); free(__captureN(fd, dir, ring, size, count, ASYNC)); write(link[1], &fd, sizeof(fd)); /* wake the parent up */ igt_force_gpu_reset(fd); + write(link[1], &fd, sizeof(fd)); /* wake the parent up */ } read(link[0], &dummy, sizeof(dummy)); + igt_require_f(poll(&(struct pollfd){link[0], POLLIN}, 1, 500) == 0, + "Capture completed too quickly! Will not block\n"); igt_debug("Submitting nop\n"); gem_execbuf(fd, &execbuf); igt_assert_eq(gem_wait(fd, obj.handle, &timeout), 0); gem_close(fd, obj.handle); + igt_assert_f(poll(&(struct pollfd){link[0], POLLIN}, 1, 0) == 0, + "Capture completed before nop!\n"); + + igt_debug("Waiting for capture/reset to complete\n"); igt_waitchildren(); close(link[0]); close(link[1]); -- 2.29.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org, Chris Wilson <chris@chris-wilson.co.uk> Subject: [igt-dev] [PATCH i-g-t] i915/gem_exec_capture: Trim the blocking workload Date: Fri, 27 Nov 2020 21:29:22 +0000 [thread overview] Message-ID: <20201127212922.865538-1-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20201127212605.860635-1-chris@chris-wilson.co.uk> While we want the capture to last long enough to delay the concurrent client, we don't want to wait forever for the capture to complete to proceed with the testing. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2559 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_exec_capture.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c index cb0d3151b..3da78d632 100644 --- a/tests/i915/gem_exec_capture.c +++ b/tests/i915/gem_exec_capture.c @@ -21,6 +21,7 @@ * IN THE SOFTWARE. */ +#include <sys/poll.h> #include <zlib.h> #include "i915/gem.h" @@ -524,6 +525,7 @@ static void prioinv(int fd, int dir, unsigned ring, const char *name) gtt, ram); count = min(gtt, ram) / 4; + count = min(count, 256); /* Keep the duration within reason */ igt_require(count > 1); intel_require_memory(count, size, CHECK_RAM); @@ -535,18 +537,26 @@ static void prioinv(int fd, int dir, unsigned ring, const char *name) igt_assert(pipe(link) == 0); igt_fork(child, 1) { fd = gem_reopen_driver(fd); - igt_debug("Submitting large hang + capture\n"); + igt_debug("Submitting large capture [%ld x %dMiB objects]\n", + count, (int)(size >> 20)); free(__captureN(fd, dir, ring, size, count, ASYNC)); write(link[1], &fd, sizeof(fd)); /* wake the parent up */ igt_force_gpu_reset(fd); + write(link[1], &fd, sizeof(fd)); /* wake the parent up */ } read(link[0], &dummy, sizeof(dummy)); + igt_require_f(poll(&(struct pollfd){link[0], POLLIN}, 1, 500) == 0, + "Capture completed too quickly! Will not block\n"); igt_debug("Submitting nop\n"); gem_execbuf(fd, &execbuf); igt_assert_eq(gem_wait(fd, obj.handle, &timeout), 0); gem_close(fd, obj.handle); + igt_assert_f(poll(&(struct pollfd){link[0], POLLIN}, 1, 0) == 0, + "Capture completed before nop!\n"); + + igt_debug("Waiting for capture/reset to complete\n"); igt_waitchildren(); close(link[0]); close(link[1]); -- 2.29.2 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-11-27 21:29 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-27 21:26 [igt-dev] [PATCH i-g-t] i915/gem_exec_capture: Trim the blocking workload Chris Wilson 2020-11-27 21:29 ` Chris Wilson [this message] 2020-11-27 21:29 ` Chris Wilson 2020-11-27 22:10 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_capture: Trim the blocking workload (rev2) Patchwork 2020-11-28 1:24 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20201127212922.865538-1-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /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.