All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: IGT development <igt-dev@lists.freedesktop.org>
Cc: Petri Latvala <petri.latvala@intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Dave Airlie <airlied@redhat.com>
Subject: [igt-dev] [PATCH i-g-t 2/7] Revert "test/i915/gem_exec_reloc: Restore interclient testings"
Date: Tue,  8 Jun 2021 11:40:15 +0200	[thread overview]
Message-ID: <20210608094020.21598-2-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20210608094020.21598-1-daniel.vetter@ffwll.ch>

This reverts commit cf2f41b3d3dfabaf3a4837062f996f3491a350b1.

And I mean revert with extreme prejudice because this was already
thrown out in

commit 39e9aa1032a4e60f776f34b3ccf4fb728abbfe5c
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Aug 10 11:00:34 2020 +0200

    tests/i915: Remove subtests that rely on async relocation behavior

and Chris then decided to undo that without any acks from the people
who've removed these tests. Or well anyone else. Commit fights in
upstream repositories are not acceptable.

Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/i915/gem_exec_reloc.c | 219 ------------------------------------
 1 file changed, 219 deletions(-)

diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index cb4899fe6e1e..efe6e2e02c52 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -426,76 +426,6 @@ static void many_active(int i915, unsigned engine)
 	}
 }
 
-static void __wide_active(int i915, unsigned engine, unsigned long count)
-{
-	struct drm_i915_gem_relocation_entry *reloc =
-		calloc(count, sizeof(*reloc));
-	struct drm_i915_gem_exec_object2 *obj =
-		calloc(count + 1, sizeof(*obj));
-	struct drm_i915_gem_execbuffer2 execbuf = {
-		.buffers_ptr = to_user_pointer(obj),
-		.buffer_count = count + 1,
-		.flags = engine | I915_EXEC_HANDLE_LUT,
-	};
-	igt_spin_t *spin;
-
-	for (unsigned long i = 0; i < count; i++) {
-		obj[i].handle = gem_create(i915, 4096);
-		obj[i].flags = EXEC_OBJECT_WRITE;
-		obj[i].flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
-	}
-
-	spin = __igt_spin_new(i915,
-			      .engine = engine,
-			      .flags = (IGT_SPIN_FENCE_OUT |
-					IGT_SPIN_NO_PREEMPTION));
-	obj[count] = spin->obj[1];
-	gem_execbuf(i915, &execbuf); /* mark all the objects as active */
-
-	for (unsigned long i = 0; i < count; i++) {
-		reloc[i].target_handle = i;
-		reloc[i].presumed_offset = ~0ull;
-		obj[i].relocs_ptr = to_user_pointer(&reloc[i]);
-		obj[i].relocation_count = 1;
-	}
-	gem_execbuf(i915, &execbuf); /* relocation onto active objects */
-
-	igt_assert_eq(sync_fence_status(spin->out_fence), 0);
-	igt_spin_free(i915, spin);
-
-	for (unsigned long i = 0; i < count; i++) {
-		uint64_t addr;
-
-		gem_read(i915, obj[i].handle, 0, &addr, sizeof(addr));
-		igt_assert_eq_u64(addr, obj[i].offset);
-
-		gem_close(i915, obj[i].handle);
-	}
-	free(obj);
-	free(reloc);
-}
-
-static void wide_active(int i915, unsigned engine)
-{
-	const uint64_t max = gem_aperture_size(i915) / 4096 / 2;
-	unsigned long count = 256;
-
-	igt_until_timeout(2) {
-		uint64_t required, total;
-
-		if (!__intel_check_memory(count, 4096, CHECK_RAM,
-					  &required, &total))
-			break;
-
-		igt_debug("Testing count:%lu\n", count);
-		__wide_active(i915, engine, count);
-
-		count <<= 1;
-		if (count >= max)
-			break;
-	}
-}
-
 static unsigned int offset_in_page(void *addr)
 {
 	return (uintptr_t)addr & 4095;
@@ -932,145 +862,6 @@ static void basic_softpin(int fd)
 	gem_close(fd, obj[1].handle);
 }
 
-static struct drm_i915_gem_relocation_entry *
-parallel_relocs(int count, unsigned long *out)
-{
-	struct drm_i915_gem_relocation_entry *reloc;
-	unsigned long sz;
-	int i;
-
-	sz = count * sizeof(*reloc);
-	sz = ALIGN(sz, 4096);
-
-	reloc = mmap(0, sz, PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
-	igt_assert(reloc != MAP_FAILED);
-	for (i = 0; i < count; i++) {
-		reloc[i].target_handle = 0;
-		reloc[i].presumed_offset = ~0ull;
-		reloc[i].offset = 8 * i;
-		reloc[i].delta = i;
-		reloc[i].read_domains = I915_GEM_DOMAIN_INSTRUCTION;
-		reloc[i].write_domain = 0;
-	}
-	mprotect(reloc, sz, PROT_READ);
-
-	*out = sz;
-	return reloc;
-}
-
-static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
-{
-	int err;
-
-	err = 0;
-	if (ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static int stop;
-static void sighandler(int sig)
-{
-	stop = 1;
-}
-
-static void parallel_child(int i915,
-			   const struct intel_execution_engine2 *engine,
-			   struct drm_i915_gem_relocation_entry *reloc,
-			   uint32_t common)
-{
-	igt_spin_t *spin = __igt_spin_new(i915, .engine = engine->flags);
-	struct drm_i915_gem_exec_object2 reloc_target = {
-		.handle = gem_create(i915, 32 * 1024 * 8),
-		.relocation_count = 32 * 1024,
-		.relocs_ptr = to_user_pointer(reloc),
-	};
-	struct drm_i915_gem_exec_object2 obj[3] = {
-		reloc_target,
-		{ .handle = common },
-		spin->obj[1],
-	};
-	struct drm_i915_gem_execbuffer2 execbuf = {
-		.buffers_ptr = to_user_pointer(obj),
-		.buffer_count = ARRAY_SIZE(obj),
-		.flags = engine->flags | I915_EXEC_HANDLE_LUT,
-	};
-	struct sigaction act = {
-		.sa_handler = sighandler,
-	};
-	unsigned long count = 0;
-
-	sigaction(SIGINT, &act, NULL);
-	while (!READ_ONCE(stop)) {
-		int err = __execbuf(i915, &execbuf);
-		if (err == -EINTR)
-			break;
-
-		igt_assert_eq(err, 0);
-		count++;
-	}
-
-	igt_info("%s: count %lu\n", engine->name, count);
-	igt_spin_free(i915, spin);
-}
-
-static void kill_children(int sig)
-{
-	signal(sig, SIG_IGN);
-	kill(-getpgrp(), SIGINT);
-	signal(sig, SIG_DFL);
-}
-
-static void parallel(int i915)
-{
-	const struct intel_execution_engine2 *e;
-	struct drm_i915_gem_relocation_entry *reloc;
-	uint32_t common = gem_create(i915, 4096);
-	uint32_t batch = batch_create(i915);
-	unsigned long reloc_sz;
-
-	reloc = parallel_relocs(32 * 1024, &reloc_sz);
-
-	stop = 0;
-	__for_each_physical_engine(i915, e) {
-		igt_fork(child, 1)
-			parallel_child(i915, e, reloc, common);
-	}
-	sleep(2);
-
-	if (gem_scheduler_has_preemption(i915)) {
-		uint32_t ctx = gem_context_clone_with_engines(i915, 0);
-
-		__for_each_physical_engine(i915, e) {
-			struct drm_i915_gem_exec_object2 obj[2] = {
-				{ .handle = common },
-				{ .handle = batch },
-			};
-			struct drm_i915_gem_execbuffer2 execbuf = {
-				.buffers_ptr = to_user_pointer(obj),
-				.buffer_count = ARRAY_SIZE(obj),
-				.flags = e->flags,
-				.rsvd1 = ctx,
-			};
-			gem_execbuf(i915, &execbuf);
-		}
-
-		gem_context_destroy(i915, ctx);
-	}
-	gem_sync(i915, batch);
-	gem_close(i915, batch);
-
-	kill_children(SIGINT);
-	igt_waitchildren();
-
-	gem_close(i915, common);
-	munmap(reloc, reloc_sz);
-}
-
 #define CONCURRENT 1024
 
 static uint64_t concurrent_relocs(int i915, int idx, int count)
@@ -1552,16 +1343,6 @@ igt_main
 		}
 	}
 
-	igt_subtest_with_dynamic("basic-wide-active") {
-		__for_each_physical_engine(fd, e) {
-			igt_dynamic_f("%s", e->name)
-				wide_active(fd, e->flags);
-		}
-	}
-
-	igt_subtest("basic-parallel")
-		parallel(fd);
-
 	igt_subtest("basic-concurrent0")
 		concurrent(fd, 0);
 	igt_subtest("basic-concurrent16")
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2021-06-08  9:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08  9:40 [igt-dev] [PATCH i-g-t 1/7] tests/gem_exec_reloc: Remove banned tests Daniel Vetter
2021-06-08  9:40 ` Daniel Vetter [this message]
2021-06-09 17:56   ` [igt-dev] [PATCH i-g-t 2/7] Revert "test/i915/gem_exec_reloc: Restore interclient testings" Jason Ekstrand
2021-06-14 10:40   ` Arkadiusz Hiler
2021-06-08  9:40 ` [igt-dev] [PATCH i-g-t 3/7] Revert "i915/gem_exec_reloc: Verify engine isolation" Daniel Vetter
2021-06-09 17:59   ` Jason Ekstrand
2021-06-08  9:40 ` [igt-dev] [PATCH i-g-t 4/7] Revert "i915/gem_exec_reloc: Exercise concurrent relocations" Daniel Vetter
2021-06-09 18:12   ` Jason Ekstrand
2021-06-08  9:40 ` [igt-dev] [PATCH i-g-t 5/7] Revert "i915/gem_exec_reloc: Flood the ring with GPU relocs" Daniel Vetter
2021-06-09 18:05   ` Jason Ekstrand
2021-06-08  9:40 ` [igt-dev] [PATCH i-g-t 6/7] Revert "i915/gem_exec_reloc: Check that relocations do not block" Daniel Vetter
2021-06-09 18:03   ` Jason Ekstrand
2021-06-08  9:40 ` [igt-dev] [PATCH i-g-t 7/7] tests/gem_exec_schedule: Use store_dword_plug again Daniel Vetter
2021-06-08 11:22 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/7] tests/gem_exec_reloc: Remove banned tests Patchwork
2021-06-08 16:02 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-08 19:25 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
2021-06-09 17:53   ` Jason Ekstrand
2021-06-08 19:44 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t] tests/gem_exec_reloc: Remove banned tests (rev2) Patchwork
2021-06-08 20:08 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-06-09  0:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2021-06-08  9:38 [igt-dev] [PATCH i-g-t 1/7] tests/gem_exec_reloc: Remove banned tests Daniel Vetter
2021-06-08  9:38 ` [igt-dev] [PATCH i-g-t 2/7] Revert "test/i915/gem_exec_reloc: Restore interclient testings" Daniel Vetter
2021-06-07  9:29 [igt-dev] [PATCH i-g-t 1/7] tests/gem_exec_reloc: Remove banned tests Daniel Vetter
2021-06-07  9:29 ` [igt-dev] [PATCH i-g-t 2/7] Revert "test/i915/gem_exec_reloc: Restore interclient testings" Daniel Vetter

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=20210608094020.21598-2-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    /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: link
Be 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.