All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] *** Dedicated vmid per process v2 ***
@ 2017-04-24  5:57 Chunming Zhou
       [not found] ` <1493013460-13344-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Chunming Zhou @ 2017-04-24  5:57 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Chunming Zhou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="all", Size: 1756 bytes --]

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.

V2:
1. address Christian's comments:
	a. drop context flags for tag process, instead, add vm ioctl.
	b. change order of patches.
	c. sync waiting only when vm flush needs.

2. address Alex's comments;
	bump module version

Chunming Zhou (6):
  drm/amdgpu: add vm ioctl
  drm/amdgpu: add dedicated vmid field in vm struct
  drm/amdgpu: reserve vmid by vm ioctl
  drm/amdgpu: add limitation for dedicated vm number v2
  drm/amdgpu: implement grab dedicated vmid V2
  drm/amdgpu: bump module verion for reserved vmid

 drivers/gpu/drm/amd/amdgpu/amdgpu.h        |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c     | 159 ++++++++++++++++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h     |   5 +
 include/uapi/drm/amdgpu_drm.h              |  20 ++++
 7 files changed, 188 insertions(+), 2 deletions(-)

-- 
1.9.1


[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH 0/6 v3] *** Dedicated vmid per process v3 ***
@ 2017-04-26 11:10 Chunming Zhou
       [not found] ` <1493205039-3721-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Chunming Zhou @ 2017-04-26 11:10 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Chunming Zhou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="all", Size: 1753 bytes --]

*** BLURB HERE ***
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.

V2:
1. address Christian's comments:
	a. drop context flags for tag process, instead, add vm ioctl.
	b. change order of patches.
	c. sync waiting only when vm flush needs.

2. address Alex's comments;
	bump module version

V3:
  address Jerry and Christian's comments.
  and only reserve gfxhub vmid


Chunming Zhou (6):
  drm/amdgpu: add vm ioctl
  drm/amdgpu: add dedicated vmid field in vm struct
  drm/amdgpu: reserve/unreserve vmid by vm ioctl v3
  drm/amdgpu: add limitation for dedicated vm number v3
  drm/amdgpu: implement grab dedicated vmid V2
  drm/amdgpu: bump module verion for reserved vmid

 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  | 148 +++++++++++++++++++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h  |   6 ++
 include/uapi/drm/amdgpu_drm.h           |  22 +++++
 5 files changed, 178 insertions(+), 2 deletions(-)

-- 
1.9.1


[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

end of thread, other threads:[~2017-04-26 11:10 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-24  5:57 [PATCH 0/6] *** Dedicated vmid per process v2 *** Chunming Zhou
     [not found] ` <1493013460-13344-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-24  5:57   ` [PATCH 1/6] drm/amdgpu: add vm ioctl Chunming Zhou
     [not found]     ` <1493013460-13344-2-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-26  7:09       ` Zhang, Jerry (Junwei)
     [not found]         ` <590047A5.1070807-5C7GfCeVMHo@public.gmane.org>
2017-04-26  8:47           ` Christian König
2017-04-24  5:57   ` [PATCH 2/6] drm/amdgpu: add dedicated vmid field in vm struct Chunming Zhou
     [not found]     ` <1493013460-13344-3-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-26  7:09       ` Zhang, Jerry (Junwei)
     [not found]         ` <590047B3.7050109-5C7GfCeVMHo@public.gmane.org>
2017-04-26  8:49           ` Christian König
     [not found]             ` <291734a9-5306-f3e3-219c-c53cbf433358-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-26  9:05               ` zhoucm1
     [not found]                 ` <590062C5.6020402-5C7GfCeVMHo@public.gmane.org>
2017-04-26  9:10                   ` Christian König
     [not found]                     ` <05c4fcec-9dae-24ac-4a5d-26e0fd5bc148-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-26  9:14                       ` zhoucm1
     [not found]                         ` <59006508.7080907-5C7GfCeVMHo@public.gmane.org>
2017-04-26  9:45                           ` Christian König
     [not found]                             ` <f41de8f1-11d9-a727-c34f-d218b08f9047-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-26  9:46                               ` zhoucm1
2017-04-24  5:57   ` [PATCH 3/6] drm/amdgpu: reserve vmid by vm ioctl Chunming Zhou
     [not found]     ` <1493013460-13344-4-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-26  7:09       ` Zhang, Jerry (Junwei)
     [not found]         ` <590047C6.50005-5C7GfCeVMHo@public.gmane.org>
2017-04-26  8:51           ` Christian König
     [not found]             ` <238b3d86-743a-4ca9-c008-92ae4e1ec79c-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-26  9:04               ` Zhang, Jerry (Junwei)
     [not found]                 ` <5900629A.20701-5C7GfCeVMHo@public.gmane.org>
2017-04-26  9:08                   ` Christian König
2017-04-24  5:57   ` [PATCH 4/6] drm/amdgpu: add limitation for dedicated vm number v2 Chunming Zhou
     [not found]     ` <1493013460-13344-5-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-26  7:10       ` Zhang, Jerry (Junwei)
     [not found]         ` <590047D0.7080901-5C7GfCeVMHo@public.gmane.org>
2017-04-26  8:53           ` Christian König
2017-04-24  5:57   ` [PATCH 5/6] drm/amdgpu: implement grab dedicated vmid V2 Chunming Zhou
2017-04-24  5:57   ` [PATCH 6/6] drm/amdgpu: bump module verion for reserved vmid Chunming Zhou
2017-04-25  9:07   ` [PATCH 0/6] *** Dedicated vmid per process v2 *** zhoucm1
     [not found]     ` <58FF11E7.6040607-5C7GfCeVMHo@public.gmane.org>
2017-04-25 10:02       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2017-04-26 11:10 [PATCH 0/6 v3] *** Dedicated vmid per process v3 *** Chunming Zhou
     [not found] ` <1493205039-3721-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-26 11:10   ` [PATCH 2/6] drm/amdgpu: add dedicated vmid field in vm struct Chunming Zhou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.