public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v4] drm/i915/slpc: Optmize waitboost for SLPC
@ 2022-10-22  0:24 Vinay Belgaumkar
  2022-10-22  0:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/slpc: Optmize waitboost for SLPC (rev4) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vinay Belgaumkar @ 2022-10-22  0:24 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Waitboost (when SLPC is enabled) results in a H2G message. This can result
in thousands of messages during a stress test and fill up an already full
CTB. There is no need to request for RP0 if boost_freq and the min softlimit
are the same.

v2: Add the tracing back, and check requested freq
in the worker thread (Tvrtko)
v3: Check requested freq in dec_waiters as well
v4: Only check min_softlimit against boost_freq. Limit this
optimization for server parts for now.

Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_rps.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index fc23c562d9b2..32e1f5dde5bb 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -1016,9 +1016,15 @@ void intel_rps_boost(struct i915_request *rq)
 		if (rps_uses_slpc(rps)) {
 			slpc = rps_to_slpc(rps);
 
+			if (slpc->min_freq_softlimit == slpc->boost_freq)
+				return;
+
 			/* Return if old value is non zero */
-			if (!atomic_fetch_inc(&slpc->num_waiters))
+			if (!atomic_fetch_inc(&slpc->num_waiters)) {
+				GT_TRACE(rps_to_gt(rps), "boost fence:%llx:%llx\n",
+					 rq->fence.context, rq->fence.seqno);
 				schedule_work(&slpc->boost_work);
+			}
 
 			return;
 		}
-- 
2.35.1


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

end of thread, other threads:[~2022-10-24 16:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-22  0:24 [Intel-gfx] [PATCH v4] drm/i915/slpc: Optmize waitboost for SLPC Vinay Belgaumkar
2022-10-22  0:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/slpc: Optmize waitboost for SLPC (rev4) Patchwork
2022-10-22  1:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-22  2:11 ` [Intel-gfx] [PATCH v4] drm/i915/slpc: Optmize waitboost for SLPC Dixit, Ashutosh
2022-10-22 17:56   ` Belgaumkar, Vinay
2022-10-22 19:22     ` Dixit, Ashutosh
2022-10-24 16:17       ` Belgaumkar, Vinay
2022-10-22 22:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/slpc: Optmize waitboost for SLPC (rev4) Patchwork

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