diff mbox series

[5/5] drm/i915: Do not use iowait while waiting for the GPU

Message ID 20180728164623.10613-5-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [1/5] drm/i915: Expose the busyspin durations for i915_wait_request | expand

Commit Message

Chris Wilson July 28, 2018, 4:46 p.m. UTC
A recent trend for cpufreq is to boost the CPU frequencies for
iowaiters, in particularly to benefit high frequency I/O. We do the same
and boost the GPU clocks to try and minimise time spent waiting for the
GPU. However, as the igfx and CPU share the same TDP, boosting the CPU
frequency will result in the GPU being throttled and its frequency being
reduced. Thus declaring iowait negatively impacts on GPU throughput.

v2: Both sleeps!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107410
References: 52ccc4314293 ("cpufreq: intel_pstate: HWP boost performance on IO wakeup")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Eero Tamminen <eero.t.tamminen@intel.com>
Cc: Francisco Jerez <currojerez@riseup.net>
---
 drivers/gpu/drm/i915/i915_request.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tvrtko Ursulin Aug. 2, 2018, 3:09 p.m. UTC | #1
On 28/07/2018 17:46, Chris Wilson wrote:
> A recent trend for cpufreq is to boost the CPU frequencies for
> iowaiters, in particularly to benefit high frequency I/O. We do the same
> and boost the GPU clocks to try and minimise time spent waiting for the
> GPU. However, as the igfx and CPU share the same TDP, boosting the CPU
> frequency will result in the GPU being throttled and its frequency being
> reduced. Thus declaring iowait negatively impacts on GPU throughput.

I see it has been discussed in another thread. My view here is that I do 
not know. But fiddling with this on our side does feel questionable.

If IO wait is waiting for a device then it is correct. If it interacts 
badly with cpufreq in specifics of shared TDP then I feel it should be 
solved elsewhere (cpufreq). I don't have a lot of ideas how though. GPU 
usage has been tried by someone in the past but I don't know how that went.

Regards,

Tvrtko

> v2: Both sleeps!
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107410
> References: 52ccc4314293 ("cpufreq: intel_pstate: HWP boost performance on IO wakeup")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Eero Tamminen <eero.t.tamminen@intel.com>
> Cc: Francisco Jerez <currojerez@riseup.net>
> ---
>   drivers/gpu/drm/i915/i915_request.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index ca25c53f8daa..694269e5b761 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -1330,7 +1330,7 @@ long i915_request_wait(struct i915_request *rq,
>   			goto complete;
>   		}
>   
> -		timeout = io_schedule_timeout(timeout);
> +		timeout = schedule_timeout(timeout);
>   	} while (1);
>   
>   	GEM_BUG_ON(!intel_wait_has_seqno(&wait));
> @@ -1387,7 +1387,7 @@ long i915_request_wait(struct i915_request *rq,
>   			break;
>   		}
>   
> -		timeout = io_schedule_timeout(timeout);
> +		timeout = schedule_timeout(timeout);
>   
>   		if (intel_wait_complete(&wait) &&
>   		    intel_wait_check_request(&wait, rq))
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index ca25c53f8daa..694269e5b761 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -1330,7 +1330,7 @@  long i915_request_wait(struct i915_request *rq,
 			goto complete;
 		}
 
-		timeout = io_schedule_timeout(timeout);
+		timeout = schedule_timeout(timeout);
 	} while (1);
 
 	GEM_BUG_ON(!intel_wait_has_seqno(&wait));
@@ -1387,7 +1387,7 @@  long i915_request_wait(struct i915_request *rq,
 			break;
 		}
 
-		timeout = io_schedule_timeout(timeout);
+		timeout = schedule_timeout(timeout);
 
 		if (intel_wait_complete(&wait) &&
 		    intel_wait_check_request(&wait, rq))