All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] tests/gem_lmem_swapping: add some coverage for big objects
@ 2022-08-05 13:10 ` Matthew Auld
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Auld @ 2022-08-05 13:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Thomas Hellström, intel-gfx

Everything we are testing here unfortunately fits within one packet (8M)
which means we have zero coverage when we need to split the copy over
multiple packets (including the aux CCS state).

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
---
 tests/i915/gem_lmem_swapping.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 1a4f4ca5..67e95cea 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -63,6 +63,7 @@ struct params {
 #define TEST_ENGINES	(1 << 4)
 #define TEST_MULTI	(1 << 5)
 #define TEST_CCS	(1 << 6)
+#define TEST_BIG	(1 << 7)
 	unsigned int flags;
 	unsigned int seed;
 	bool oom_test;
@@ -477,8 +478,8 @@ static void fill_params(int i915, struct params *params,
 {
 	const int swap_mb = /* For lmem, swap is total of smem + swap. */
 		igt_get_total_ram_mb() + igt_get_total_swap_mb();
-	const unsigned int size = 1 << 20;
 	const int max_swap_pct = 75;
+	unsigned int size;
 	/*
 	 * In random mode, add 85% hard limit to use system memory.
 	 * noticed that 88.8% can trigger OOM on some system.
@@ -487,6 +488,17 @@ static void fill_params(int i915, struct params *params,
 	int spill_mb;
 	uint32_t handle;
 
+	size = 1 << 20;
+	if (flags & TEST_BIG) {
+		/*
+		 * The kernel only copies in small chunks, so make sure we
+		 * have some coverage where multiple packets are needed to copy
+		 * the entire object.
+		 */
+		size = 1u << 26; /* 64M */
+		size += 1u << 16; /* So we also exceed NUM_CCS_BLKS_PER_XFER */
+	}
+
 	if (flags & TEST_RANDOM) {
 		params->size.min = 4096;
 		handle = create_bo(i915, &params->size.min, &region->region,
@@ -733,6 +745,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		unsigned int flags;
 	} *test, tests[] = {
 		{ "basic", 0 },
+		{ "basic-big", TEST_BIG },
 		{ "random", TEST_RANDOM },
 		{ "random-engines", TEST_RANDOM | TEST_ENGINES },
 		{ "heavy-random", TEST_RANDOM | TEST_HEAVY },
@@ -746,6 +759,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		{ "parallel-random-verify", TEST_PARALLEL | TEST_RANDOM | TEST_VERIFY },
 		{ "parallel-multi", TEST_PARALLEL | TEST_RANDOM | TEST_VERIFY | TEST_ENGINES | TEST_MULTI },
 		{ "verify-ccs", TEST_CCS },
+		{ "verify-ccs-big", TEST_CCS | TEST_BIG },
 		{ "verify-random-ccs", TEST_CCS | TEST_RANDOM },
 		{ "heavy-verify-random-ccs", TEST_CCS | TEST_RANDOM | TEST_HEAVY },
 		{ "heavy-verify-multi-ccs", TEST_CCS | TEST_RANDOM | TEST_HEAVY | TEST_ENGINES | TEST_MULTI },
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-08  1:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 13:10 [Intel-gfx] [PATCH i-g-t] tests/gem_lmem_swapping: add some coverage for big objects Matthew Auld
2022-08-05 13:10 ` [igt-dev] " Matthew Auld
2022-08-05 13:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-05 17:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-08-08  1:07 ` [Intel-gfx] [PATCH i-g-t] " Ramalingam C
2022-08-08  1:07   ` [igt-dev] " Ramalingam C

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.