* [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
@ 2018-07-06 12:53 Chris Wilson
2018-07-06 13:09 ` Matthew Auld
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chris Wilson @ 2018-07-06 12:53 UTC (permalink / raw)
To: intel-gfx; +Cc: Matthew Auld
Limit the GTT size we try and allocate to ensure that it fits within RAM
and does not trigger the oomkiller indiscriminately.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 20 ++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index e108fe4e0fd9..600a3bcbd3d6 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -148,7 +148,7 @@ static int igt_ppgtt_alloc(void *arg)
{
struct drm_i915_private *dev_priv = arg;
struct i915_hw_ppgtt *ppgtt;
- u64 size, last;
+ u64 size, last, limit;
int err = 0;
/* Allocate a ppggt and try to fill the entire range */
@@ -163,10 +163,18 @@ static int igt_ppgtt_alloc(void *arg)
if (!ppgtt->vm.allocate_va_range)
goto err_ppgtt_cleanup;
+ /*
+ * While we only allocate the page tables here and so we could
+ * address a much larger GTT than we could actually fit into
+ * RAM, a practical limit is the amount of physical pages in the system.
+ * This should ensure that we do not run into the oomkiller during
+ * the test and take down the machine wilfully.
+ */
+ limit = totalram_pages << PAGE_SHIFT;
+ limit = min(ppgtt->vm.total, limit);
+
/* Check we can allocate the entire range */
- for (size = 4096;
- size <= ppgtt->vm.total;
- size <<= 2) {
+ for (size = 4096; size <= limit; size <<= 2) {
err = ppgtt->vm.allocate_va_range(&ppgtt->vm, 0, size);
if (err) {
if (err == -ENOMEM) {
@@ -183,9 +191,7 @@ static int igt_ppgtt_alloc(void *arg)
}
/* Check we can incrementally allocate the entire range */
- for (last = 0, size = 4096;
- size <= ppgtt->vm.total;
- last = size, size <<= 2) {
+ for (last = 0, size = 4096; size <= limit; last = size, size <<= 2) {
err = ppgtt->vm.allocate_va_range(&ppgtt->vm,
last, size - last);
if (err) {
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
2018-07-06 12:53 [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM Chris Wilson
@ 2018-07-06 13:09 ` Matthew Auld
2018-07-06 15:25 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Matthew Auld @ 2018-07-06 13:09 UTC (permalink / raw)
To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld
On 6 July 2018 at 13:53, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Limit the GTT size we try and allocate to ensure that it fits within RAM
> and does not trigger the oomkiller indiscriminately.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.SPARSE: warning for drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
2018-07-06 12:53 [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM Chris Wilson
2018-07-06 13:09 ` Matthew Auld
@ 2018-07-06 15:25 ` Patchwork
2018-07-06 15:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-07 12:22 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-06 15:25 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
URL : https://patchwork.freedesktop.org/series/46075/
State : warning
== Summary ==
$ dim sparse origin/drm-tip
Commit: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
+drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:174:17: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:174:17: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
2018-07-06 12:53 [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM Chris Wilson
2018-07-06 13:09 ` Matthew Auld
2018-07-06 15:25 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
@ 2018-07-06 15:43 ` Patchwork
2018-07-07 12:22 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-06 15:43 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
URL : https://patchwork.freedesktop.org/series/46075/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4446 -> Patchwork_9569 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46075/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9569 that come from known issues:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_suspend@basic-s4-devices:
{fi-kbl-8809g}: DMESG-WARN (fdo#107139) -> INCOMPLETE (fdo#107139)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
== Participating hosts (47 -> 42) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4446 -> Patchwork_9569
CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9569: 951ac5597a9bb633b7b1b9cca98c874b550c3e5e @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
951ac5597a9b drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9569/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
2018-07-06 12:53 [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM Chris Wilson
` (2 preceding siblings ...)
2018-07-06 15:43 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-07-07 12:22 ` Patchwork
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-07 12:22 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
URL : https://patchwork.freedesktop.org/series/46075/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4446_full -> Patchwork_9569_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9569_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_9569_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9569_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd1:
shard-kbl: SKIP -> PASS +1
== Known issues ==
Here are the changes found in Patchwork_9569_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
shard-kbl: PASS -> DMESG-FAIL (fdo#106560, fdo#106947)
igt@kms_cursor_legacy@cursor-vs-flip-toggle:
shard-hsw: PASS -> FAIL (fdo#103355)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#103822) +1
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@drv_selftest@live_gtt:
shard-kbl: FAIL (fdo#105347, fdo#107127) -> PASS
shard-apl: FAIL (fdo#105347, fdo#107127) -> PASS
igt@kms_busy@extended-pageflip-hang-oldfb-render-a:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
shard-glk: FAIL (fdo#106509) -> PASS
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: FAIL (fdo#103822) -> PASS
igt@kms_flip_tiling@flip-y-tiled:
shard-glk: FAIL -> PASS
igt@kms_universal_plane@cursor-fb-leak-pipe-c:
shard-apl: FAIL -> PASS
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4446 -> Patchwork_9569
CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9569: 951ac5597a9bb633b7b1b9cca98c874b550c3e5e @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9569/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-07 12:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 12:53 [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM Chris Wilson
2018-07-06 13:09 ` Matthew Auld
2018-07-06 15:25 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-07-06 15:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-07 12:22 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.