* [PATCH] drm/i915: Flush pending GTT writes before unbinding
@ 2017-12-04 12:43 Chris Wilson
2017-12-04 12:46 ` Joonas Lahtinen
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Chris Wilson @ 2017-12-04 12:43 UTC (permalink / raw)
To: intel-gfx; +Cc: Chris Wilson, Joonas Lahtinen, stable
>From the shrinker paths, we want to relinquish the GPU and GGTT access to
the object, releasing the backing storage back to the system for
swapout. As a part of that process we would unpin the pages, marking
them for access by the CPU (for the swapout/swapin). However, if that
process was interrupted after unbind the vma, we missed a flush of the
inflight GGTT writes before we made that GTT space available again for
reuse, with the prospect that we would redirect them to another page.
The bug dates back to the introduction of multiple GGTT vma, but the
code itself dates to commit 02bef8f98d26 ("drm/i915: Unbind closed vma
for i915_gem_object_unbind()").
Fixes: 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()")
Fixes: c5ad54cf7dd8 ("drm/i915: Use partial view in mmap fault handler")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/i915/i915_gem.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e083f242b8dc..80b78fb5daac 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -330,17 +330,10 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj)
* must wait for all rendering to complete to the object (as unbinding
* must anyway), and retire the requests.
*/
- ret = i915_gem_object_wait(obj,
- I915_WAIT_INTERRUPTIBLE |
- I915_WAIT_LOCKED |
- I915_WAIT_ALL,
- MAX_SCHEDULE_TIMEOUT,
- NULL);
+ ret = i915_gem_object_set_to_cpu_domain(obj, false);
if (ret)
return ret;
- i915_gem_retire_requests(to_i915(obj->base.dev));
-
while ((vma = list_first_entry_or_null(&obj->vma_list,
struct i915_vma,
obj_link))) {
--
2.15.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] drm/i915: Flush pending GTT writes before unbinding
2017-12-04 12:43 [PATCH] drm/i915: Flush pending GTT writes before unbinding Chris Wilson
@ 2017-12-04 12:46 ` Joonas Lahtinen
2017-12-04 13:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2017-12-04 12:46 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: stable
On Mon, 2017-12-04 at 12:43 +0000, Chris Wilson wrote:
> From the shrinker paths, we want to relinquish the GPU and GGTT access to
> the object, releasing the backing storage back to the system for
> swapout. As a part of that process we would unpin the pages, marking
> them for access by the CPU (for the swapout/swapin). However, if that
> process was interrupted after unbind the vma, we missed a flush of the
> inflight GGTT writes before we made that GTT space available again for
> reuse, with the prospect that we would redirect them to another page.
>
> The bug dates back to the introduction of multiple GGTT vma, but the
> code itself dates to commit 02bef8f98d26 ("drm/i915: Unbind closed vma
> for i915_gem_object_unbind()").
>
> Fixes: 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()")
> Fixes: c5ad54cf7dd8 ("drm/i915: Use partial view in mmap fault handler")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: stable@vger.kernel.org
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] drm/i915: Flush pending GTT writes before unbinding
@ 2017-12-04 12:46 ` Joonas Lahtinen
0 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2017-12-04 12:46 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: stable
On Mon, 2017-12-04 at 12:43 +0000, Chris Wilson wrote:
> From the shrinker paths, we want to relinquish the GPU and GGTT access to
> the object, releasing the backing storage back to the system for
> swapout. As a part of that process we would unpin the pages, marking
> them for access by the CPU (for the swapout/swapin). However, if that
> process was interrupted after unbind the vma, we missed a flush of the
> inflight GGTT writes before we made that GTT space available again for
> reuse, with the prospect that we would redirect them to another page.
>
> The bug dates back to the introduction of multiple GGTT vma, but the
> code itself dates to commit 02bef8f98d26 ("drm/i915: Unbind closed vma
> for i915_gem_object_unbind()").
>
> Fixes: 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()")
> Fixes: c5ad54cf7dd8 ("drm/i915: Use partial view in mmap fault handler")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: stable@vger.kernel.org
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: Flush pending GTT writes before unbinding
2017-12-04 12:43 [PATCH] drm/i915: Flush pending GTT writes before unbinding Chris Wilson
2017-12-04 12:46 ` Joonas Lahtinen
@ 2017-12-04 13:22 ` Patchwork
2017-12-04 13:25 ` [RESEND] " Chris Wilson
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-12-04 13:22 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Flush pending GTT writes before unbinding
URL : https://patchwork.freedesktop.org/series/34830/
State : failure
== Summary ==
Series 34830v1 drm/i915: Flush pending GTT writes before unbinding
https://patchwork.freedesktop.org/api/1.0/series/34830/revisions/1/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> FAIL (fi-elk-e7500) fdo#103989 +1
Test gem_exec_reloc:
Subgroup basic-gtt-read-noreloc:
pass -> INCOMPLETE (fi-byt-j1900)
Test gem_ringfill:
Subgroup basic-default-hang:
dmesg-warn -> INCOMPLETE (fi-pnv-d510) fdo#101600
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:439s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:443s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:384s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:524s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:283s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:503s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:507s
fi-byt-j1900 total:85 pass:75 dwarn:0 dfail:0 fail:0 skip:9
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:480s
fi-elk-e7500 total:224 pass:162 dwarn:15 dfail:0 fail:1 skip:45
fi-gdg-551 total:288 pass:179 dwarn:1 dfail:0 fail:0 skip:108 time:271s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:540s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:383s
fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:261s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:396s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:479s
fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:449s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:484s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:528s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:484s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:538s
fi-pnv-d510 total:146 pass:113 dwarn:0 dfail:0 fail:0 skip:32
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:542s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:566s
fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:523s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:500s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:448s
fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:418s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:613s
fi-glk-dsi total:184 pass:169 dwarn:0 dfail:0 fail:1 skip:13
b866e173d70abc9fc308d40141d6bfafd2a8591a drm-tip: 2017y-12m-04d-09h-19m-02s UTC integration manifest
1f4c091e7e74 drm/i915: Flush pending GTT writes before unbinding
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7395/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread* [RESEND] drm/i915: Flush pending GTT writes before unbinding
2017-12-04 12:43 [PATCH] drm/i915: Flush pending GTT writes before unbinding Chris Wilson
2017-12-04 12:46 ` Joonas Lahtinen
2017-12-04 13:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-12-04 13:25 ` Chris Wilson
2017-12-04 13:58 ` ✓ Fi.CI.BAT: success for drm/i915: Flush pending GTT writes before unbinding (rev2) Patchwork
2017-12-04 15:21 ` ✗ Fi.CI.IGT: failure " Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-12-04 13:25 UTC (permalink / raw)
To: intel-gfx; +Cc: Chris Wilson, Joonas Lahtinen, stable
>From the shrinker paths, we want to relinquish the GPU and GGTT access to
the object, releasing the backing storage back to the system for
swapout. As a part of that process we would unpin the pages, marking
them for access by the CPU (for the swapout/swapin). However, if that
process was interrupted after unbind the vma, we missed a flush of the
inflight GGTT writes before we made that GTT space available again for
reuse, with the prospect that we would redirect them to another page.
The bug dates back to the introduction of multiple GGTT vma, but the
code itself dates to commit 02bef8f98d26 ("drm/i915: Unbind closed vma
for i915_gem_object_unbind()").
Fixes: 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()")
Fixes: c5ad54cf7dd8 ("drm/i915: Use partial view in mmap fault handler")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e083f242b8dc..80b78fb5daac 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -330,17 +330,10 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj)
* must wait for all rendering to complete to the object (as unbinding
* must anyway), and retire the requests.
*/
- ret = i915_gem_object_wait(obj,
- I915_WAIT_INTERRUPTIBLE |
- I915_WAIT_LOCKED |
- I915_WAIT_ALL,
- MAX_SCHEDULE_TIMEOUT,
- NULL);
+ ret = i915_gem_object_set_to_cpu_domain(obj, false);
if (ret)
return ret;
- i915_gem_retire_requests(to_i915(obj->base.dev));
-
while ((vma = list_first_entry_or_null(&obj->vma_list,
struct i915_vma,
obj_link))) {
--
2.15.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* ✓ Fi.CI.BAT: success for drm/i915: Flush pending GTT writes before unbinding (rev2)
2017-12-04 12:43 [PATCH] drm/i915: Flush pending GTT writes before unbinding Chris Wilson
` (2 preceding siblings ...)
2017-12-04 13:25 ` [RESEND] " Chris Wilson
@ 2017-12-04 13:58 ` Patchwork
2017-12-04 15:21 ` ✗ Fi.CI.IGT: failure " Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-12-04 13:58 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Flush pending GTT writes before unbinding (rev2)
URL : https://patchwork.freedesktop.org/series/34830/
State : success
== Summary ==
Series 34830v2 drm/i915: Flush pending GTT writes before unbinding
https://patchwork.freedesktop.org/api/1.0/series/34830/revisions/2/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> PASS (fi-elk-e7500) fdo#103989 +1
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:444s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:441s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:385s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:527s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:283s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:506s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:510s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:501s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:476s
fi-elk-e7500 total:224 pass:163 dwarn:15 dfail:0 fail:0 skip:45
fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:275s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:538s
fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:260s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:393s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:490s
fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:446s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:490s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:533s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:478s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:537s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:593s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:452s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:540s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:563s
fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:517s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:501s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:449s
fi-snb-2520m total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:552s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:420s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:616s
fi-glk-dsi total:288 pass:257 dwarn:0 dfail:0 fail:1 skip:30 time:505s
fi-hsw-4770 failed to collect. IGT log at Patchwork_7396/fi-hsw-4770/igt.log
b866e173d70abc9fc308d40141d6bfafd2a8591a drm-tip: 2017y-12m-04d-09h-19m-02s UTC integration manifest
8474aec4f849 drm/i915: Flush pending GTT writes before unbinding
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7396/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread* ✗ Fi.CI.IGT: failure for drm/i915: Flush pending GTT writes before unbinding (rev2)
2017-12-04 12:43 [PATCH] drm/i915: Flush pending GTT writes before unbinding Chris Wilson
` (3 preceding siblings ...)
2017-12-04 13:58 ` ✓ Fi.CI.BAT: success for drm/i915: Flush pending GTT writes before unbinding (rev2) Patchwork
@ 2017-12-04 15:21 ` Patchwork
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-12-04 15:21 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Flush pending GTT writes before unbinding (rev2)
URL : https://patchwork.freedesktop.org/series/34830/
State : failure
== Summary ==
Test testdisplay:
pass -> INCOMPLETE (shard-hsw)
Test drv_module_reload:
Subgroup basic-no-display:
pass -> DMESG-WARN (shard-snb) fdo#102707
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test gem_busy:
Subgroup close-race:
pass -> FAIL (shard-snb) fdo#103829
Test gem_tiled_swapping:
Subgroup non-threaded:
pass -> INCOMPLETE (shard-hsw) fdo#104009
Test drv_selftest:
Subgroup live_hangcheck:
incomplete -> PASS (shard-snb) fdo#103880
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-a:
pass -> SKIP (shard-hsw)
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103829 https://bugs.freedesktop.org/show_bug.cgi?id=103829
fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880
shard-hsw total:2629 pass:1511 dwarn:2 dfail:0 fail:9 skip:1105 time:8770s
shard-snb total:2657 pass:1301 dwarn:2 dfail:0 fail:13 skip:1340 time:7813s
Blacklisted hosts:
shard-apl total:2663 pass:1685 dwarn:4 dfail:0 fail:24 skip:950 time:13863s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7396/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-04 15:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 12:43 [PATCH] drm/i915: Flush pending GTT writes before unbinding Chris Wilson
2017-12-04 12:46 ` Joonas Lahtinen
2017-12-04 12:46 ` Joonas Lahtinen
2017-12-04 13:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-12-04 13:25 ` [RESEND] " Chris Wilson
2017-12-04 13:58 ` ✓ Fi.CI.BAT: success for drm/i915: Flush pending GTT writes before unbinding (rev2) Patchwork
2017-12-04 15:21 ` ✗ Fi.CI.IGT: failure " 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.