I accidentally noticed some inefficiencies on the job submit path which seemed
easy to address. CPU usage of the DRM scheduler submission thread:

                        before  after
UnigineHeaven           2.3%    1.3%
vkgears vsync off       15%     12%

Gains are mostly due reduced hammering on the delayed worker rescheduling. Stock
profile of the scheduler thread otherwise looks like this:

 20.25%  [kernel]  [k] __mod_timer
  2.87%  [kernel]  [k] enqueue_timer 
  2.16%  [kernel]  [k] amdgpu_gfx_profile_ring_end_use

More pairs of eyes would be welcome to check I did not break something.

Cc: Alex Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: Timur Kristóf <[email protected]>

Tvrtko Ursulin (3):
  drm/amdgpu: Remove unused amdgpu_device_ip_is_hw
  drm/amdgpu: Save some cycles on the job submission path
  drm/amdgpu: Do not fiddle with the idle workers too much

 drivers/gpu/drm/amd/amdgpu/amdgpu.h           |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    |  3 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       | 11 +++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c        | 21 -------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_ip.h        |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c      |  9 ++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c       | 12 +++++------
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c         | 12 +++++------
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c     | 14 +++++--------
 drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h |  8 ++++++-
 10 files changed, 36 insertions(+), 57 deletions(-)

-- 
2.54.0

Reply via email to