Re: [igt-dev] [PATCH i-g-t 2/4] test/gem_lmem_swapping: fix physical engine usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Mar 2022 07:26:19 -0700, Matthew Auld wrote:
>
> @@ -353,14 +356,17 @@ static void test_evict(int i915,
>	if (flags & TEST_PARALLEL) {
>		int fd = gem_reopen_driver(i915);
>
> +		ctx = intel_ctx_create_all_physical(fd);
> +		__gem_context_set_persistence(i915, ctx->id, false);
> +
>		igt_fork(child, nproc)
> -			__do_evict(fd, &region->region, &params,
> +			__do_evict(fd, ctx, &region->region, &params,
>				   params.seed + child + 1);
>
>		igt_waitchildren();
>		close(fd);

We might introduce some memory leak tests some time so it would be good to
destroy any contexts we create with intel_ctx_destroy().

> @@ -528,17 +536,20 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>		for_each_physical_engine(i915, e)
>			__num_engines__++;
>		igt_require(__num_engines__);
> +		ctx = intel_ctx_create_all_physical(i915);
> +		__gem_context_set_persistence(i915, ctx->id, false);
> +
>	}
>
>	for (test = tests; test->name; test++) {
>		igt_describe("Exercise local memory swapping to system memory");
>		dynamic_lmem_subtest(region, regions, test->name)
> -			test_evict(i915, region, test->flags);
> +			test_evict(i915, ctx, region, test->flags);
>	}
>
>	igt_describe("Exercise local memory swapping during exhausting system memory");
>	dynamic_lmem_subtest(region, regions, "smem-oom")
> -		test_smem_oom(i915, region);
> +		test_smem_oom(i915, ctx, region);
>
>	igt_fixture {
>		free(regions);

Here too.



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux