public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/i915: Wait for the struct_mutex on idling
@ 2019-04-29 18:00 Chris Wilson
  2019-04-29 18:00 ` [PATCH 2/5] drm/i915: Only reschedule the submission tasklet if preemption is possible Chris Wilson
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Chris Wilson @ 2019-04-29 18:00 UTC (permalink / raw)
  To: intel-gfx

When the system is idling, contention for struct_mutex should be low and
so we will be more efficient to wait for a contended mutex than
reschedule.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_pm.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_pm.c b/drivers/gpu/drm/i915/i915_gem_pm.c
index 3554d55dae35..3b6e8d5be8e1 100644
--- a/drivers/gpu/drm/i915/i915_gem_pm.c
+++ b/drivers/gpu/drm/i915/i915_gem_pm.c
@@ -47,13 +47,7 @@ static void idle_work_handler(struct work_struct *work)
 	struct drm_i915_private *i915 =
 		container_of(work, typeof(*i915), gem.idle_work.work);
 
-	if (!mutex_trylock(&i915->drm.struct_mutex)) {
-		/* Currently busy, come back later */
-		mod_delayed_work(i915->wq,
-				 &i915->gem.idle_work,
-				 msecs_to_jiffies(50));
-		return;
-	}
+	mutex_lock(&i915->drm.struct_mutex);
 
 	intel_wakeref_lock(&i915->gt.wakeref);
 	if (!intel_wakeref_active(&i915->gt.wakeref))
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-05-03 14:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-29 18:00 [PATCH 1/5] drm/i915: Wait for the struct_mutex on idling Chris Wilson
2019-04-29 18:00 ` [PATCH 2/5] drm/i915: Only reschedule the submission tasklet if preemption is possible Chris Wilson
2019-04-30  9:35   ` [PATCH v2] " Chris Wilson
2019-04-29 18:00 ` [PATCH 3/5] drm/i915: Delay semaphore submission until the start of the signaler Chris Wilson
2019-04-29 18:00 ` [PATCH 4/5] drm/i915: Disable semaphore busywaits on saturated systems Chris Wilson
2019-04-30  8:55   ` Tvrtko Ursulin
2019-04-30  9:04     ` Chris Wilson
2019-04-30  9:07     ` Chris Wilson
2019-05-03 13:25   ` Tvrtko Ursulin
2019-05-03 14:04   ` Ville Syrjälä
2019-05-03 14:12     ` Chris Wilson
2019-05-03 14:32       ` Ville Syrjälä
2019-04-29 18:00 ` [PATCH 5/5] drm/i915/execlists: Don't apply priority boost for resets Chris Wilson
2019-04-29 18:08 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/5] drm/i915: Wait for the struct_mutex on idling Patchwork
2019-04-30  7:39 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-30 11:12 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-04-30 13:12 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/5] drm/i915: Wait for the struct_mutex on idling (rev2) Patchwork
2019-04-30 13:27 ` ✗ Fi.CI.BAT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox