From: Matthew Auld <matthew.auld@intel.com> To: igt-dev@lists.freedesktop.org Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>, intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t] tests/gem_lmem_swapping: add some coverage for big objects Date: Fri, 5 Aug 2022 14:10:52 +0100 [thread overview] Message-ID: <20220805131052.441896-1-matthew.auld@intel.com> (raw) 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, ¶ms->size.min, ®ion->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
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.auld@intel.com> To: igt-dev@lists.freedesktop.org Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>, intel-gfx@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t] tests/gem_lmem_swapping: add some coverage for big objects Date: Fri, 5 Aug 2022 14:10:52 +0100 [thread overview] Message-ID: <20220805131052.441896-1-matthew.auld@intel.com> (raw) 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, ¶ms->size.min, ®ion->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
next reply other threads:[~2022-08-05 13:12 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-05 13:10 Matthew Auld [this message] 2022-08-05 13:10 ` [igt-dev] [PATCH i-g-t] tests/gem_lmem_swapping: add some coverage for big objects 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
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=20220805131052.441896-1-matthew.auld@intel.com \ --to=matthew.auld@intel.com \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=thomas.hellstrom@linux.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: 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.