Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G
On 25/03/2022 10:18, Petri Latvala wrote: On Thu, Mar 24, 2022 at 02:26:20PM +, Matthew Auld wrote: From: CQ Tang On some systems lmem can be as large as 16G, which seems to trigger various CI timeouts, and in the best case just takes a long time. For the purposes of the test we should be able to limit to 4G, without any big loss in coverage. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Nirmoy Das --- tests/i915/gem_lmem_swapping.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c index 995a663f..ad1c989c 100644 --- a/tests/i915/gem_lmem_swapping.c +++ b/tests/i915/gem_lmem_swapping.c @@ -526,7 +526,13 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) igt_fixture { struct intel_execution_engine2 *e; - i915 = drm_open_driver(DRIVER_INTEL); + igt_i915_driver_unload(); + if (igt_i915_driver_load("lmem_size=4096")) { + igt_debug("i915 missing lmem_size modparam support\n"); + igt_assert_eq(igt_i915_driver_load(NULL), 0); + } Does the driver load truly fail with an unknown param? Yeah, I have since removed that. From the CI logs it just loads anyway...
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G
On Thu, Mar 24, 2022 at 02:26:20PM +, Matthew Auld wrote: > From: CQ Tang > > On some systems lmem can be as large as 16G, which seems to trigger > various CI timeouts, and in the best case just takes a long time. For > the purposes of the test we should be able to limit to 4G, without any > big loss in coverage. > > Signed-off-by: CQ Tang > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Nirmoy Das > --- > tests/i915/gem_lmem_swapping.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c > index 995a663f..ad1c989c 100644 > --- a/tests/i915/gem_lmem_swapping.c > +++ b/tests/i915/gem_lmem_swapping.c > @@ -526,7 +526,13 @@ igt_main_args("", long_options, help_str, opt_handler, > NULL) > igt_fixture { > struct intel_execution_engine2 *e; > > - i915 = drm_open_driver(DRIVER_INTEL); > + igt_i915_driver_unload(); > + if (igt_i915_driver_load("lmem_size=4096")) { > + igt_debug("i915 missing lmem_size modparam support\n"); > + igt_assert_eq(igt_i915_driver_load(NULL), 0); > + } Does the driver load truly fail with an unknown param? -- Petri Latvala > + > + i915 = __drm_open_driver(DRIVER_INTEL); > igt_require_gem(i915); > igt_require(gem_has_lmem(i915)); > > @@ -554,6 +560,7 @@ igt_main_args("", long_options, help_str, opt_handler, > NULL) > igt_fixture { > free(regions); > close(i915); > + igt_i915_driver_unload(); > } > > igt_exit(); > -- > 2.34.1 >
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G
On Fri, Mar 25, 2022 at 08:40:45AM +, Matthew Auld wrote: > On 24/03/2022 17:47, Dixit, Ashutosh wrote: > > On Thu, 24 Mar 2022 07:26:20 -0700, Matthew Auld wrote: > > > > > > @@ -554,6 +560,7 @@ igt_main_args("", long_options, help_str, > > > opt_handler, NULL) > > > igt_fixture { > > > free(regions); > > > close(i915); > > > + igt_i915_driver_unload(); > > > > I thought we'd reload the module with default params here but when the next > > test runs the module gets loaded automatically so maybe this is ok? > > Yeah, that at least matches my understanding. Adding Petri in case he has > some comments here. Yes, the convention is to either leave the module loaded with defaults, or leave it unloaded. If the next test happens to be one that wants to load the module with different params, we save some time. If loading the module again doesn't work we should see some fireworks in CI results elsewhere anyway. Due to module loading problems we used to limit them to known places (reloading tests, selftests, ...) so we might need to revisit this topic later. But no need to FUD it at this time. -- Petri Latvala
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G
On 24/03/2022 17:47, Dixit, Ashutosh wrote: On Thu, 24 Mar 2022 07:26:20 -0700, Matthew Auld wrote: @@ -554,6 +560,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) igt_fixture { free(regions); close(i915); + igt_i915_driver_unload(); I thought we'd reload the module with default params here but when the next test runs the module gets loaded automatically so maybe this is ok? Yeah, that at least matches my understanding. Adding Petri in case he has some comments here.
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G
On Thu, 24 Mar 2022 07:26:20 -0700, Matthew Auld wrote: > > @@ -554,6 +560,7 @@ igt_main_args("", long_options, help_str, opt_handler, > NULL) > igt_fixture { > free(regions); > close(i915); > + igt_i915_driver_unload(); I thought we'd reload the module with default params here but when the next test runs the module gets loaded automatically so maybe this is ok?