From: Ramalingam C <ramalingam.c@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: igt-dev@lists.freedesktop.org,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH i-g-t] tests/gem_lmem_swapping: add some coverage for big objects
Date: Mon, 8 Aug 2022 06:37:14 +0530 [thread overview]
Message-ID: <YvBhwvj+umyYqqry@ramaling-i9x> (raw)
In-Reply-To: <20220805131052.441896-1-matthew.auld@intel.com>
On 2022-08-05 at 14:10:52 +0100, Matthew Auld wrote:
> 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;
Since we are extending, could we test for >2G too? Might catch if we ever break the obj size
support for >=2G in kernel. Like using int/uint instead of u64.
May be another test as TEST_HUGE!?
Otherwise looks good to me
Reveiwed-by: Ramalingam C<ramalingam.c@intel.com>
> /*
> * 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
>
prev parent reply other threads:[~2022-08-08 1:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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-08 1:07 ` Ramalingam C [this message]
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=YvBhwvj+umyYqqry@ramaling-i9x \
--to=ramalingam.c@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox