Skip to contentSkip to conversation

drm/i915: Don't skip request retirement if the active list is empty

PATCH Applied [email protected] 4 participants 7 messages May 28, 2015 – Jun 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Don't skip request retirement if the active list is empty

From: Ville Syrjälä <[email protected]>

Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.

The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.

---
 drivers/gpu/drm/i915/i915_gem.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +0 -3
index be35f04..c35e035 100644
@@ -2813,9 +2813,6 @@ i915_gem_retire_requests_ring(struct intel_engine_cs *ring)
 {
 	WARN_ON(i915_verify_lists(ring->dev));
 
-	if (list_empty(&ring->active_list))
-		return;
-
 	/* Retire requests first as we use it above for the early return.
 	 * If we retire requests last, we may use a later seqno and so clear
 	 * the requests lists without clearing the active list, leading to
Signature · 6 lines
2.3.6

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.

Quoted 6 lines

The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.

Whlist I agree (I use list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing the active_list correctly. Pretty much the only thing that can generate a request without an object (and so avoid touching the active_list) is a CS flip, and I doubt you are using those...

Anyway,

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 14 lines · Chris Wilson
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.

Quoted 6 lines

The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.

Quoted 5 lines

Whlist I agree (I use list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing the active_list correctly. Pretty much the only thing that can generate a request without an object (and so avoid touching the active_list) is a CS flip, and I doubt you are using those...

Oh, I forgot to mention that this was in ringbuffer mode. I guess I should try execlist too.

Quoted 8 lines

Anyway,

-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Chris Wilson
Quoted 12 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.

The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.

Quoted 8 lines
Quoted 5 lines

Whlist I agree (I use list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing the active_list correctly. Pretty much the only thing that can generate a request without an object (and so avoid touching the active_list) is a CS flip, and I doubt you are using those...

Oh, I forgot to mention that this was in ringbuffer mode. I guess I should try execlist too.

Now I am even more curious where the partial request came from. Anyhow, it is immaterial since olr is just a great big wart overdue for replacement.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Applied
#4 lore raw
In reply to Chris Wilson
Quoted 20 lines · Chris Wilson
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.

Quoted 6 lines

The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.

Whlist I agree (I use list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing the active_list correctly. Pretty much the only thing that can generate a request without an object (and so avoid touching the active_list) is a CS flip, and I doubt you are using those...

Quoted 3 lines

Anyway,

Pushed to drm-intel-fixes, thanks for the patch and review.

BR,
Jani.

Quoted 8 lines

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#5 lore raw
Quoted 21 lines · Jani Nikula
Quoted 20 lines · Chris Wilson
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.

Quoted 6 lines

The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.

Whlist I agree (I use list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing the active_list correctly. Pretty much the only thing that can generate a request without an object (and so avoid touching the active_list) is a CS flip, and I doubt you are using those...

Quoted 5 lines
Quoted 3 lines

Anyway,

Pushed to drm-intel-fixes, thanks for the patch and review.

Reverted from drm-intel-fixes because I misapplied it, and applied to drm-intel-next-fixes instead. Sorry for the noise.

BR,
Jani.

Quoted 16 lines

BR,
Jani.

Quoted 8 lines

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#6 lore raw
In reply to [email protected]

Task id: 6497 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  276/276              276/276
ILK                                  303/303              303/303
SNB                 -1              315/315              314/315
IVB                                  343/343              343/343
BYT                                  287/287              287/287
BDW                                  320/320              320/320

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*SNB igt@pm_rpm@dpms-mode-unset-non-lpsp PASS(1) DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx