* [PATCH i-g-t] i915/gem_mmap_gtt: Replace forked-mmaped tests with a lighter variant
@ 2019-09-17 13:09 Chris Wilson
2019-09-17 13:31 ` Mika Kuoppala
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2019-09-17 13:09 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Introduce a new 2-process fork test that is bound to a single cpu to
exercise contention during pagefaults. This is a much lighter variant of
the all-cpus test intended to be viable even on the legendary frozen
lakes of molasses.
References: https://bugs.freedesktop.org/show_bug.cgi?id=110882
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
---
tests/i915/gem_mmap_gtt.c | 36 +++++++++++++++++++++++++-----------
tests/intel-ci/blacklist.txt | 2 +-
2 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index ac439cdf8..0428a1372 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -792,9 +792,6 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b, int ncpus)
uint64_t huge_object_size, i;
unsigned mode = CHECK_RAM;
- igt_fail_on_f(intel_gen(devid) >= 11 && ncpus > 1,
- "Please adjust your expectations, https://bugs.freedesktop.org/show_bug.cgi?id=110882\n");
-
switch (huge) {
case -2:
huge_object_size = gem_mappable_aperture_size() / 4;
@@ -1138,17 +1135,34 @@ igt_main
for (const struct copy_mode *m = copy_modes; m->suffix; m++) {
igt_subtest_f("%s-copy%s", s->prefix, m->suffix)
test_huge_copy(fd,
- s->size,
- m->tiling_x,
- m->tiling_y,
- 1);
+ s->size,
+ m->tiling_x,
+ m->tiling_y,
+ 1);
+
+ igt_subtest_f("cpuset-%s-copy%s", s->prefix, m->suffix) {
+ cpu_set_t cpu, old;
+
+ sched_getaffinity(0, sizeof(old), &old);
+
+ CPU_ZERO(&cpu);
+ CPU_SET(0, &cpu);
+ igt_assert(sched_setaffinity(0, sizeof(cpu), &cpu) == 0);
+ test_huge_copy(fd,
+ s->size,
+ m->tiling_x,
+ m->tiling_y,
+ 2);
+
+ igt_assert(sched_setaffinity(0, sizeof(old), &old) == 0);
+ }
igt_subtest_f("forked-%s-copy%s", s->prefix, m->suffix)
test_huge_copy(fd,
- s->size,
- m->tiling_x,
- m->tiling_y,
- ncpus);
+ s->size,
+ m->tiling_x,
+ m->tiling_y,
+ ncpus);
}
}
diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
index 8e3dafa98..5fa91105f 100644
--- a/tests/intel-ci/blacklist.txt
+++ b/tests/intel-ci/blacklist.txt
@@ -47,7 +47,7 @@ igt@gem_gtt_hog(@.*)?
igt@gem_gtt_speed(@.*)?
igt@gem_hangcheck_forcewake(@.*)?
igt@gem_lut_handle(@.*)?
-igt@gem_mmap_gtt@.*(huge|swap|clflush).*
+igt@gem_mmap_gtt@.*(huge|swap|clflush|forked).*
igt@gem_mmap@.*(swap|huge).*
igt@gem_mocs_settings@.*(suspend|hibernate).*
igt@gem_pin(@.*)?
--
2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH i-g-t] i915/gem_mmap_gtt: Replace forked-mmaped tests with a lighter variant
2019-09-17 13:09 [PATCH i-g-t] i915/gem_mmap_gtt: Replace forked-mmaped tests with a lighter variant Chris Wilson
@ 2019-09-17 13:31 ` Mika Kuoppala
2019-09-17 13:37 ` Mika Kuoppala
0 siblings, 1 reply; 3+ messages in thread
From: Mika Kuoppala @ 2019-09-17 13:31 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Introduce a new 2-process fork test that is bound to a single cpu to
> exercise contention during pagefaults. This is a much lighter variant of
> the all-cpus test intended to be viable even on the legendary frozen
> lakes of molasses.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=110882
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Martin Peres <martin.peres@linux.intel.com>
> ---
> tests/i915/gem_mmap_gtt.c | 36 +++++++++++++++++++++++++-----------
> tests/intel-ci/blacklist.txt | 2 +-
> 2 files changed, 26 insertions(+), 12 deletions(-)
>
> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> index ac439cdf8..0428a1372 100644
> --- a/tests/i915/gem_mmap_gtt.c
> +++ b/tests/i915/gem_mmap_gtt.c
> @@ -792,9 +792,6 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b, int ncpus)
> uint64_t huge_object_size, i;
> unsigned mode = CHECK_RAM;
>
> - igt_fail_on_f(intel_gen(devid) >= 11 && ncpus > 1,
> - "Please adjust your expectations, https://bugs.freedesktop.org/show_bug.cgi?id=110882\n");
> -
> switch (huge) {
> case -2:
> huge_object_size = gem_mappable_aperture_size() / 4;
> @@ -1138,17 +1135,34 @@ igt_main
> for (const struct copy_mode *m = copy_modes; m->suffix; m++) {
> igt_subtest_f("%s-copy%s", s->prefix, m->suffix)
> test_huge_copy(fd,
> - s->size,
> - m->tiling_x,
> - m->tiling_y,
> - 1);
> + s->size,
> + m->tiling_x,
> + m->tiling_y,
> + 1);
> +
> + igt_subtest_f("cpuset-%s-copy%s", s->prefix, m->suffix) {
> + cpu_set_t cpu, old;
> +
> + sched_getaffinity(0, sizeof(old), &old);
> +
> + CPU_ZERO(&cpu);
> + CPU_SET(0, &cpu);
> + igt_assert(sched_setaffinity(0, sizeof(cpu), &cpu) == 0);
> + test_huge_copy(fd,
> + s->size,
> + m->tiling_x,
> + m->tiling_y,
> + 2);
> +
> + igt_assert(sched_setaffinity(0, sizeof(old), &old) == 0);
> + }
>
> igt_subtest_f("forked-%s-copy%s", s->prefix, m->suffix)
> test_huge_copy(fd,
> - s->size,
> - m->tiling_x,
> - m->tiling_y,
> - ncpus);
> + s->size,
> + m->tiling_x,
> + m->tiling_y,
> + ncpus);
> }
> }
>
> diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
> index 8e3dafa98..5fa91105f 100644
> --- a/tests/intel-ci/blacklist.txt
> +++ b/tests/intel-ci/blacklist.txt
> @@ -47,7 +47,7 @@ igt@gem_gtt_hog(@.*)?
> igt@gem_gtt_speed(@.*)?
> igt@gem_hangcheck_forcewake(@.*)?
> igt@gem_lut_handle(@.*)?
> -igt@gem_mmap_gtt@.*(huge|swap|clflush).*
> +igt@gem_mmap_gtt@.*(huge|swap|clflush|forked).*
Dunno if this is enough for bat to pick it up. Regardless,
patch does what it says, using 2 threads on single cpu.
It should fly, even with maps of molasses.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> igt@gem_mmap@.*(swap|huge).*
> igt@gem_mocs_settings@.*(suspend|hibernate).*
> igt@gem_pin(@.*)?
> --
> 2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH i-g-t] i915/gem_mmap_gtt: Replace forked-mmaped tests with a lighter variant
2019-09-17 13:31 ` Mika Kuoppala
@ 2019-09-17 13:37 ` Mika Kuoppala
0 siblings, 0 replies; 3+ messages in thread
From: Mika Kuoppala @ 2019-09-17 13:37 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
Mika Kuoppala <mika.kuoppala@linux.intel.com> writes:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
>
>> Introduce a new 2-process fork test that is bound to a single cpu to
>> exercise contention during pagefaults. This is a much lighter variant of
>> the all-cpus test intended to be viable even on the legendary frozen
>> lakes of molasses.
>>
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=110882
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> Cc: Martin Peres <martin.peres@linux.intel.com>
>> ---
>> tests/i915/gem_mmap_gtt.c | 36 +++++++++++++++++++++++++-----------
>> tests/intel-ci/blacklist.txt | 2 +-
>> 2 files changed, 26 insertions(+), 12 deletions(-)
>>
>> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
>> index ac439cdf8..0428a1372 100644
>> --- a/tests/i915/gem_mmap_gtt.c
>> +++ b/tests/i915/gem_mmap_gtt.c
>> @@ -792,9 +792,6 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b, int ncpus)
>> uint64_t huge_object_size, i;
>> unsigned mode = CHECK_RAM;
>>
>> - igt_fail_on_f(intel_gen(devid) >= 11 && ncpus > 1,
>> - "Please adjust your expectations, https://bugs.freedesktop.org/show_bug.cgi?id=110882\n");
>> -
>> switch (huge) {
>> case -2:
>> huge_object_size = gem_mappable_aperture_size() / 4;
>> @@ -1138,17 +1135,34 @@ igt_main
>> for (const struct copy_mode *m = copy_modes; m->suffix; m++) {
>> igt_subtest_f("%s-copy%s", s->prefix, m->suffix)
>> test_huge_copy(fd,
>> - s->size,
>> - m->tiling_x,
>> - m->tiling_y,
>> - 1);
>> + s->size,
>> + m->tiling_x,
>> + m->tiling_y,
>> + 1);
>> +
>> + igt_subtest_f("cpuset-%s-copy%s", s->prefix, m->suffix) {
>> + cpu_set_t cpu, old;
>> +
>> + sched_getaffinity(0, sizeof(old), &old);
>> +
>> + CPU_ZERO(&cpu);
>> + CPU_SET(0, &cpu);
>> + igt_assert(sched_setaffinity(0, sizeof(cpu), &cpu) == 0);
>> + test_huge_copy(fd,
>> + s->size,
>> + m->tiling_x,
>> + m->tiling_y,
>> + 2);
>> +
>> + igt_assert(sched_setaffinity(0, sizeof(old), &old) == 0);
>> + }
>>
>> igt_subtest_f("forked-%s-copy%s", s->prefix, m->suffix)
>> test_huge_copy(fd,
>> - s->size,
>> - m->tiling_x,
>> - m->tiling_y,
>> - ncpus);
>> + s->size,
>> + m->tiling_x,
>> + m->tiling_y,
>> + ncpus);
>> }
>> }
>>
>> diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
>> index 8e3dafa98..5fa91105f 100644
>> --- a/tests/intel-ci/blacklist.txt
>> +++ b/tests/intel-ci/blacklist.txt
>> @@ -47,7 +47,7 @@ igt@gem_gtt_hog(@.*)?
>> igt@gem_gtt_speed(@.*)?
>> igt@gem_hangcheck_forcewake(@.*)?
>> igt@gem_lut_handle(@.*)?
>> -igt@gem_mmap_gtt@.*(huge|swap|clflush).*
>> +igt@gem_mmap_gtt@.*(huge|swap|clflush|forked).*
>
> Dunno if this is enough for bat to pick it up. Regardless,
> patch does what it says, using 2 threads on single cpu.
>
> It should fly, even with maps of molasses.
Subtest cpuset-basic-small-copy: SUCCESS (2,965s)
Subtest cpuset-basic-small-copy-XY: SUCCESS (4,457s)
Subtest cpuset-big-copy-XY: SUCCESS (17,738s)
Subtest cpuset-medium-copy-XY: SUCCESS (8,871s)
-Mika
>
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
>> igt@gem_mmap@.*(swap|huge).*
>> igt@gem_mocs_settings@.*(suspend|hibernate).*
>> igt@gem_pin(@.*)?
>> --
>> 2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-17 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-17 13:09 [PATCH i-g-t] i915/gem_mmap_gtt: Replace forked-mmaped tests with a lighter variant Chris Wilson
2019-09-17 13:31 ` Mika Kuoppala
2019-09-17 13:37 ` Mika Kuoppala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox