[Intel-gfx] [PATCH v4 0/3] drm/i915: Context aware user agnostic EU/Slice/Sub-slice control within kernel
Ankit Navik
ankit.p.navik at intel.com
Thu Mar 14 08:36:52 UTC 2019
Current GPU configuration code for i915 does not allow us to change
EU/Slice/Sub-slice configuration dynamically. Its done only once while context
is created.
While particular graphics application is running, if we examine the command
requests from user space, we observe that command density is not consistent.
It means there is scope to change the graphics configuration dynamically even
while context is running actively. This patch series proposes the solution to
find the active pending load for all active context at given time and based on
that, dynamically perform graphics configuration for each context.
We use a hr (high resolution) timer with i915 driver in kernel to get a
callback every few milliseconds (this timer value can be configured through
debugfs, default is '0' indicating timer is in disabled state i.e. original
system without any intervention).In the timer callback, we examine pending
commands for a context in the queue, essentially, we intercept them before
they are executed by GPU and we update context with required number of EUs.
Two questions, how did we arrive at right timer value? and what's the right
number of EUs? For the prior one, empirical data to achieve best performance
in least power was considered. For the later one, we roughly categorized number
of EUs logically based on platform. Now we compare number of pending commands
with a particular threshold and then set number of EUs accordingly with update
context. That threshold is also based on experiments & findings. If GPU is able
to catch up with CPU, typically there are no pending commands, the EU config
would remain unchanged there. In case there are more pending commands we
reprogram context with higher number of EUs. Please note, here we are changing
EUs even while context is running by examining pending commands every 'x'
milliseconds.
With this solution in place, on KBL-GT3 + Android and Ubuntu (Linux) we saw
following pnp benefits, power numbers mentioned here are system power.
App /KPI | % Power | % Power |
| Benefit | Benefit |
| (mW) | (mW) |
| Android | Ubuntu |
---------------------------------|----------|
3D Mark (Ice storm) | 2.30% | N.A. |
TRex On screen | 2.49% | 2.97% |
TRex Off screen | 1.32% | N.A. |
Manhattan On screen | 3.11% | 4.90% |
Manhattan Off screen | 0.89% | N.A. |
AnTuTu 6.1.4 | 3.42% | N.A. |
SynMark2 | N.A. | 1.70% |
Note - For KBL (GEN9) we cannot control at sub-slice level, it was always a
constraint.
We always controlled number of EUs rather than sub-slices/slices.
We have also observed GPU core residencies improves by 1.035%.
Praveen Diwakar (3):
drm/i915: Get active pending request for given context
drm/i915: set optimum eu/slice/sub-slice configuration based on load
type
drm/i915: Predictive governor to control eu/slice/subslice
drivers/gpu/drm/i915/Makefile | 1 +
drivers/gpu/drm/i915/i915_debugfs.c | 1 +
drivers/gpu/drm/i915/i915_drv.h | 9 +++
drivers/gpu/drm/i915/i915_gem.c | 3 +
drivers/gpu/drm/i915/i915_gem_context.c | 21 ++++++
drivers/gpu/drm/i915/i915_gem_context.h | 39 +++++++++++
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +
drivers/gpu/drm/i915/i915_params.c | 4 ++
drivers/gpu/drm/i915/i915_params.h | 1 +
drivers/gpu/drm/i915/intel_deu.c | 109 +++++++++++++++++++++++++++++
drivers/gpu/drm/i915/intel_device_info.c | 47 ++++++++++++-
drivers/gpu/drm/i915/intel_drv.h | 3 +
drivers/gpu/drm/i915/intel_lrc.c | 48 ++++++++++++-
13 files changed, 285 insertions(+), 3 deletions(-)
create mode 100644 drivers/gpu/drm/i915/intel_deu.c
--
2.7.4
More information about the Intel-gfx
mailing list