igt/gem_userptr_blits: Check mlock requirement before asserting
PATCH 1/1 igt/gem_userptr_blits: Check mlock requirement before asserting
The tests that do mlocked evictions sometimes fail because a child they spawn would map a lot of memory and get killed by OOM. This patch does not consider this a fail since it is a requirement of the test to be able to mlock the memory.
As a result of this patch some gem_userptr_blits@mlocked* tests might start skipping instead of failing.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95427
--- lib/igt_core.c | 40 ++++++++++++++++++++++++---------------- lib/igt_core.h | 1 + tests/eviction_common.c | 5 ++++- 3 files changed, 29 insertions(+), 17 deletions(-)
lib/igt_core.c +24 -16
@@ -1687,20 +1687,7 @@ void igt_child_done(pid_t pid) test_children[i] = test_children[i +1 ]; } -/** -* igt_waitchildren: -* -* Wait for all children forked with igt_fork. -* -* The magic here is that exit codes from children will be correctly propagated -* to the main thread, including the relevant exit code if a child thread failed. -* Of course if multiple children failed with different exit codes the resulting -* exit code will be non-deterministic. -* -* Note that igt_skip() will not be forwarded, feature tests need to be done -* before spawning threads with igt_fork(). -*/ -void igt_waitchildren (void ) +int __igt_waitchildren (void ) {int err =0 ;int count;
@@ -1746,8 +1733,29 @@ void igt_waitchildren(void) } num_test_children =0 ; -if (err) -igt_fail (err); + +return err; +} + +/** +* igt_waitchildren: +* +* Wait for all children forked with igt_fork. +* +* The magic here is that exit codes from children will be correctly propagated +* to the main thread, including the relevant exit code if a child thread failed. +* Of course if multiple children failed with different exit codes the resulting +* exit code will be non-deterministic. +* +* Note that igt_skip() will not be forwarded, feature tests need to be done +* before spawning threads with igt_fork(). +*/ +void igt_waitchildren (void ) +{ +int ret =__igt_waitchildren (); + +if (ret) +igt_fail (ret); }/**
lib/igt_core.h +1 -0
@@ -689,6 +689,7 @@ bool __igt_fork(void);for (int child =0 ; child < (num_children); child++) \for (;__igt_fork ();exit (0 )) void igt_child_done(pid_t pid); +int __igt_waitchildren (void );void igt_waitchildren (void );void igt_waitchildren_timeout (int seconds,const char *reason);
tests/eviction_common.c +4 -1
@@ -135,6 +135,7 @@ static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops, {unsigned int *can_mlock;uint64_t sz, pin; +int child_ret;intel_require_memory (surface_count, surface_size,CHECK_RAM );
@@ -158,8 +159,10 @@ static void mlocked_evictions(int fd, struct igt_eviction_test_ops *ops,if (locked !=NULL && !mlock (locked, pin + sz)) *can_mlock =1 ; } -igt_waitchildren (); + child_ret =__igt_waitchildren ();igt_require (*can_mlock); +igt_assert (child_ret ==0 ); +munmap (can_mlock,4096 ); igt_fork(child, 1) {
Signature · 6 lines
2.14.2 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Antonio Argenziano (2018-02-07 18:47:23)
Quoted 4 lines
The tests that do mlocked evictions sometimes fail because a child they spawn would map a lot of memory and get killed by OOM. This patch does not consider this a fail since it is a requirement of the test to be able to mlock the memory.
They die after we confirm that there is enough available memory to satisfy the request. It's a bug somewhere.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for igt/gem_userptr_blits: Check mlock requirement before asserting
In reply to Antonio Argenziano== Series Details ==
== Series Details ==
Series: igt/gem_userptr_blits: Check mlock requirement before asserting
URL : https://patchwork.freedesktop.org/series/37831/
State : success
== Summary ==
IGT patchset tested on top of latest successful build c0c5a10a4a7bf81614179002beb8cc945180c920 tests/perf_pmu: Test RC6 during runtime suspend
with latest DRM-Tip kernel build CI_DRM_3736e4fe439facdf drm-tip: 2018y-02m-07d-17h-08m-01s UTC integration manifest
No testlist changes.
Test prime_vgem:
Subgroup basic-fence-flip:
fail -> PASS (fi-skl-6770hq)fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:422s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:423s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:376s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:487s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:288s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:484s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:484s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:474s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:462s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:570s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:581s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:420s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:287s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:512s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:393s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:414s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:449s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:418s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:459s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:495s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:453s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:499s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:598s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:437s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:507s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:525s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:490s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:488s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:420s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:431s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:525s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:399s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:469s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_886/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for igt/gem_userptr_blits: Check mlock requirement before asserting
In reply to Antonio Argenziano== Series Details ==
== Series Details ==
Series: igt/gem_userptr_blits: Check mlock requirement before asserting
URL : https://patchwork.freedesktop.org/series/37831/
State : success
== Summary ==
Test perf:
Subgroup buffer-fill:
pass -> FAIL (shard-apl) fdo#103755
Subgroup oa-exponents:
fail -> PASS (shard-apl) fdo#102254
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-cur-indfb-draw-render:
pass -> FAIL (shard-apl) fdo#101623
Test kms_flip:
Subgroup modeset-vs-vblank-race-interruptible:
pass -> FAIL (shard-hsw) fdo#103060 +1
Subgroup flip-vs-absolute-wf_vblank:
pass -> FAIL (shard-hsw) fdo#100368
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-b-frame-sequence:
pass -> FAIL (shard-apl) fdo#103481
Test gem_eio:
Subgroup in-flight-suspend:
pass -> FAIL (shard-hsw) fdo#104676fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
shard-apl total:3388 pass:1754 dwarn:1 dfail:0 fail:24 skip:1608 time:12248s shard-hsw total:3444 pass:1758 dwarn:1 dfail:0 fail:13 skip:1671 time:11804s shard-snb total:3444 pass:1351 dwarn:1 dfail:0 fail:10 skip:2082 time:6689s
Blacklisted hosts:
shard-kbl total:3444 pass:1913 dwarn:1 dfail:0 fail:21 skip:1509 time:9542s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_886/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 8 lines · Chris Wilson
Quoting Antonio Argenziano (2018-02-07 18:47:23)
Quoted 4 lines
The tests that do mlocked evictions sometimes fail because a child they spawn would map a lot of memory and get killed by OOM. This patch does not consider this a fail since it is a requirement of the test to be able to mlock the memory.
They die after we confirm that there is enough available memory to satisfy the request. It's a bug somewhere.
hmmm, OK. My thinking was: since it is not i915's doing consider it a requirement, but I see your point.
Thanks,
Antonio
Quoted 2 lines
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev