* [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent
@ 2017-11-09 10:21 Chris Wilson
2017-11-09 10:23 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2017-11-09 10:21 UTC (permalink / raw)
To: intel-gfx
vm_free_page() may call down into set_pages_array_wb() (which itself
sleeps, on x86 at least) but only if on !llc and the caches overflow.
Since this is unlikely, we only rarely trigger the error in practice,
and so to make CI detection of this sleeping bug possible we want to
mark the common vm_free_page() as a potential sleep.
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 2847a6b41c16..1e40eeb31f9d 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -454,6 +454,14 @@ static void vm_free_pages_release(struct i915_address_space *vm,
static void vm_free_page(struct i915_address_space *vm, struct page *page)
{
+ /*
+ * On !llc, we need to change the pages back to WB. We only do so
+ * in bulk, so we rarely need to change the page attributes here,
+ * but doing so requires a stop_machine() from deep inside arch/x86/mm.
+ * To make detection of the possible sleep more likely, use an
+ * unconditional might_sleep() for everybody.
+ */
+ might_sleep();
if (!pagevec_add(&vm->free_pages, page))
vm_free_pages_release(vm, false);
}
--
2.15.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent
2017-11-09 10:21 [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent Chris Wilson
@ 2017-11-09 10:23 ` Chris Wilson
2017-11-09 10:46 ` Daniel Vetter
2017-11-09 10:42 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-09 11:37 ` ✓ Fi.CI.IGT: success " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2017-11-09 10:23 UTC (permalink / raw)
To: intel-gfx
Quoting Chris Wilson (2017-11-09 10:21:41)
> vm_free_page() may call down into set_pages_array_wb() (which itself
> sleeps, on x86 at least) but only if on !llc and the caches overflow.
> Since this is unlikely, we only rarely trigger the error in practice,
> and so to make CI detection of this sleeping bug possible we want to
> mark the common vm_free_page() as a potential sleep.
>
References: https://bugs.freedesktop.org/show_bug.cgi?id=103638
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Matthew Auld <matthew.william.auld@gmail.com>
The real test ofc is whether this reports an error from CI.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915: Mark vm_free_page() as a potential sleeper agent
2017-11-09 10:21 [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent Chris Wilson
2017-11-09 10:23 ` Chris Wilson
@ 2017-11-09 10:42 ` Patchwork
2017-11-09 11:37 ` ✓ Fi.CI.IGT: success " Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-11-09 10:42 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Mark vm_free_page() as a potential sleeper agent
URL : https://patchwork.freedesktop.org/series/33503/
State : warning
== Summary ==
Series 33503v1 drm/i915: Mark vm_free_page() as a potential sleeper agent
https://patchwork.freedesktop.org/api/1.0/series/33503/revisions/1/mbox/
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
Test gem_ctx_basic:
fail -> SKIP (fi-gdg-551)
Test gem_ctx_switch:
Subgroup basic-default:
pass -> DMESG-WARN (fi-bdw-5557u)
pass -> DMESG-WARN (fi-bdw-gvtdvm)
Subgroup basic-default-heavy:
pass -> DMESG-WARN (fi-skl-6600u)
Test gem_exec_reloc:
Subgroup basic-cpu-gtt-active:
fail -> PASS (fi-gdg-551) fdo#102582 +2
Test gem_sync:
Subgroup basic-store-all:
fail -> PASS (fi-ivb-3520m) fdo#100007
fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fi-bdw-5557u total:289 pass:267 dwarn:1 dfail:0 fail:0 skip:21 time:441s
fi-bdw-gvtdvm total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:457s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:379s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:544s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:273s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:506s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:505s
fi-byt-j1900 total:289 pass:254 dwarn:0 dfail:0 fail:0 skip:35 time:501s
fi-byt-n2820 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:487s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:427s
fi-gdg-551 total:289 pass:176 dwarn:1 dfail:0 fail:3 skip:109 time:265s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:539s
fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:430s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:444s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:426s
fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:482s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:467s
fi-kbl-7500u total:289 pass:263 dwarn:1 dfail:0 fail:1 skip:24 time:465s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:525s
fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:480s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:534s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:567s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s
fi-skl-6600u total:289 pass:261 dwarn:1 dfail:0 fail:0 skip:27 time:545s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:563s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:516s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:491s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:458s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:568s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:418s
Blacklisted hosts:
fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:553s
fi-glk-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:491s
65dc54b704d3ee0486f9f5b11f00c28973f783a2 drm-tip: 2017y-11m-09d-08h-53m-46s UTC integration manifest
2a794913c1f6 drm/i915: Mark vm_free_page() as a potential sleeper agent
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7031/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent
2017-11-09 10:23 ` Chris Wilson
@ 2017-11-09 10:46 ` Daniel Vetter
2017-11-09 10:54 ` Chris Wilson
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2017-11-09 10:46 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Thu, Nov 09, 2017 at 10:23:44AM +0000, Chris Wilson wrote:
> Quoting Chris Wilson (2017-11-09 10:21:41)
> > vm_free_page() may call down into set_pages_array_wb() (which itself
> > sleeps, on x86 at least) but only if on !llc and the caches overflow.
> > Since this is unlikely, we only rarely trigger the error in practice,
> > and so to make CI detection of this sleeping bug possible we want to
> > mark the common vm_free_page() as a potential sleep.
> >
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=103638
> > Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthew Auld <matthew.william.auld@gmail.com>
>
> The real test ofc is whether this reports an error from CI.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
But if it indeed blows up on CI I think it'd be good to fix first, then
apply the more aggressive debug check. Otherwise CI and Marta will be on
fire :-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent
2017-11-09 10:46 ` Daniel Vetter
@ 2017-11-09 10:54 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2017-11-09 10:54 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
Quoting Daniel Vetter (2017-11-09 10:46:41)
> On Thu, Nov 09, 2017 at 10:23:44AM +0000, Chris Wilson wrote:
> > Quoting Chris Wilson (2017-11-09 10:21:41)
> > > vm_free_page() may call down into set_pages_array_wb() (which itself
> > > sleeps, on x86 at least) but only if on !llc and the caches overflow.
> > > Since this is unlikely, we only rarely trigger the error in practice,
> > > and so to make CI detection of this sleeping bug possible we want to
> > > mark the common vm_free_page() as a potential sleep.
> > >
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=103638
> > > Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > > Cc: Matthew Auld <matthew.william.auld@gmail.com>
> >
> > The real test ofc is whether this reports an error from CI.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> But if it indeed blows up on CI I think it'd be good to fix first, then
> apply the more aggressive debug check. Otherwise CI and Marta will be on
> fire :-)
It got a few more hits, but not across the board as I was hoping. The
next place is i915_vma_unbind(). That is always a potential sleeper due
to its implicit wait on the GPU.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Mark vm_free_page() as a potential sleeper agent
2017-11-09 10:21 [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent Chris Wilson
2017-11-09 10:23 ` Chris Wilson
2017-11-09 10:42 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2017-11-09 11:37 ` Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-11-09 11:37 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Mark vm_free_page() as a potential sleeper agent
URL : https://patchwork.freedesktop.org/series/33503/
State : success
== Summary ==
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-atomic-transitions:
pass -> FAIL (shard-hsw) fdo#102670
Test kms_plane:
Subgroup plane-position-hole-dpms-pipe-c-planes:
skip -> PASS (shard-hsw)
Test kms_rotation_crc:
Subgroup primary-rotation-180:
skip -> PASS (shard-hsw)
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a:
skip -> PASS (shard-hsw)
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test perf:
Subgroup blocking:
pass -> FAIL (shard-hsw) fdo#102252
Test pm_lpsp:
Subgroup screens-disabled:
fail -> PASS (shard-hsw) fdo#102579
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102579 https://bugs.freedesktop.org/show_bug.cgi?id=102579
shard-hsw total:2540 pass:1432 dwarn:0 dfail:0 fail:11 skip:1097 time:9315s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7031/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-09 11:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 10:21 [PATCH] drm/i915: Mark vm_free_page() as a potential sleeper agent Chris Wilson
2017-11-09 10:23 ` Chris Wilson
2017-11-09 10:46 ` Daniel Vetter
2017-11-09 10:54 ` Chris Wilson
2017-11-09 10:42 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-09 11:37 ` ✓ Fi.CI.IGT: success " 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.