[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-26 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files changed, 11

[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-26 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files changed,

[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files change

[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files change

[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files change

[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files chang

[PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Liu, Shaoyun
Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 2 files changed,

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-26 Thread Christian König
Am 26.03.19 um 19:54 schrieb Liu, Shaoyun: Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 + drivers/gpu/drm/amd/am

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-26 Thread Kuehling, Felix
On 2019-03-26 2:54 p.m., Liu, Shaoyun wrote: > Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for > peer device > > Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 > Signed-off-by: shaoyunl > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 + > drivers

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Christian König
Am 26.03.19 um 21:35 schrieb Liu, Shaoyun: Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++ drivers/gpu/drm/amd

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Liu, Shaoyun
The  next in struct amdgpu_vm_bo_base  is not a  list_head,  I'm not sure whether we can use list_for_each_entry here. Regards shaoyun.liu On 2019-03-27 3:41 a.m., Christian König wrote: > Am 26.03.19 um 21:35 schrieb Liu, Shaoyun: >> Avoid unnecessary XGMI hight pstate trigger when mapping non

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Koenig, Christian
Ah, of course. In this case feel free to go ahead. BTW: What's the size of the structure now? Christian. Am 27.03.2019 16:22 schrieb "Liu, Shaoyun" : The next in struct amdgpu_vm_bo_base is not a list_head, I'm not sure whether we can use list_for_each_entry here. Regards shaoyun.liu On 2

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Liu, Shaoyun
you mean struct amdgpu_vm_bo_base ? It only has few pointer and a list_head , should be pretty small . struct amdgpu_vm_bo_base { /* constant after initialization */ struct amdgpu_vm*vm; struct amdgpu_bo*bo; /* protected by bo being reserved */ struct amdgp

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Koenig, Christian
Yeah, that one is intentionally very small because it is used so often. When it grows over the next power of two by this change we need to figure out a different approach. Christian. Am 27.03.2019 16:34 schrieb "Liu, Shaoyun" : you mean struct amdgpu_vm_bo_base ? It only has few pointer and

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Liu, Shaoyun
bool is_xgmi is added in bo_va structure , this change won't increase the size of struct amdgpu_vm_bo_base. Anyway , can I said it's reviewed by you now? shaoyun.liu On 2019-03-27 11:39 a.m., Koenig, Christian wrote: Yeah, that one is intentionally very small because it is used so often. Whe

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Koenig, Christian
Yeah, feel free to add my RB. Christian. Am 27.03.2019 16:43 schrieb "Liu, Shaoyun" : bool is_xgmi is added in bo_va structure , this change won't increase the size of struct amdgpu_vm_bo_base. Anyway , can I said it's reviewed by you now? shaoyun.liu On 2019-03-27 11:39 a.m., Koenig, Chri

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Kuehling, Felix
On 2019-03-26 4:35 p.m., Liu, Shaoyun wrote: > Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for > peer device > > Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 > Signed-off-by: shaoyunl > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++ > driv

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-27 Thread Liu, Shaoyun
Even the preferred_domains been changed for bo that original is none xgmi here , it doesn't means driver must change the XGMI status for the bo_va. From current design, only the bo later been added to the compute VM (through bo_add) will be enable the XGMI mapping. Without that call , the XGMI

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Kuehling, Felix
On 2019-03-28 1:55 p.m., Liu, Shaoyun wrote: > Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for > peer device > > Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 > Signed-off-by: shaoyunl > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 + > dr

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Liu, Shaoyun
I think we only care about the context device (adev) and the real device this bo been allocated(robj->tbo.bdev).  The bo_va or base  don't have  the device pointer directly, it have  a pointer to bo which should be the  same  as robj here.  We  can move the same_hive  check out of the loop . R

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Kuehling, Felix
On 2019-03-28 3:47 p.m., Liu, Shaoyun wrote: > I think we only care about the context device (adev) and the real device > this bo been allocated(robj->tbo.bdev).  The bo_va or base  don't have > the device pointer directly, it have  a pointer to bo which should be > the  same  as robj here.  We  ca

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-28 Thread Kuehling, Felix
On 2019-03-28 4:38 p.m., Liu, Shaoyun wrote: > Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for > peer device > > Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 > Signed-off-by: shaoyunl This patch is Reviewed-by: Felix Kuehling Please also give Christian a c

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-29 Thread Christian König
Am 28.03.19 um 18:55 schrieb Liu, Shaoyun: Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 + drivers/gpu/drm/a

Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state

2019-03-29 Thread Christian König
Am 28.03.19 um 21:39 schrieb Kuehling, Felix: On 2019-03-28 4:38 p.m., Liu, Shaoyun wrote: Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2 Signed-off-by: shaoyunl This patch is Reviewed-by: Felix K