Am 21.04.2017 um 18:27 schrieb Deucher, Alexander:
-----Original Message-----
From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf
Of Chunming Zhou
Sent: Friday, April 21, 2017 6:06 AM
To: amd-gfx@lists.freedesktop.org
Cc: Zhou, David(ChunMing)
Subject: [PATCH 0/5] *** Dedicated vmid per process ***

The current kernel implementation, which grabs the idle VMID from pool
when emitting the job may:

     The back-to-back submission from one process could use different VMID.
     The submission to different queues from single process could use different
VMID

It works well in most case but cannot work for the SQ thread trace capture.

The VMID for the submission that set the {SQTT}_BASE, which refers to the
address of the trace buffer, is stored in shader engine.

If the profiling application have to use different VMIDs to submit IBs in its 
life
cycle:

     Some trace is not captured since it actually uses different VMID to submit
jobs.
     Some part of captured trace may come from different application since
they are accidentally uses the owner’s VMID to submit jobs.
Please add a patch at the end to bump the module version so we can track when 
the flag is available.

Additional to that we might want to reconsider the interface once more.

When we see a context with that flag we assign a permanent ID to the VM and never free until the process exits. That is quite ugly.

I would either suggest to add an atomic and alloc/free the VMID when the first/last context needing it for a trace in a process is created/freed.

Or completely drop the per context flag and add a new IOCTL to enable it for the whole process.

I prefer option #2, but that is clearly more work.

Regards,
Christian.


Alex


ChunmingrZhour(5):
   drm/amdgpu: handle flags when context alloc
   drm/amdgpu: add dedicated vmid field in vm struct
   drm/amdgpu: add context flagn for dedicated vmid reqest
   drm/amdgpu: implement grab dedicated vmid
   drm/amdgpu: add limitation for dedicated vm number

  drivers/gpu/drm/amd/amdgpu/amdgpu.h        |   1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c    |  14 ++-
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c     | 137
++++++++++++++++++++++++++++-
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h     |   6 ++
  include/uapi/drm/amdgpu_drm.h              |   3 +
  6 files changed, 158 insertions(+), 4 deletions(-)

--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


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

Reply via email to