All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-28 17:55 Liu, Shaoyun
       [not found] ` <1553795695-6065-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-28 17:55 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 9ee8d7a..82dc2b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -31,6 +31,7 @@
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
 #include "amdgpu_display.h"
+#include "amdgpu_xgmi.h"
 
 void amdgpu_gem_object_free(struct drm_gem_object *gobj)
 {
@@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_device *adev = dev->dev_private;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_vm_bo_base *base;
+	struct amdgpu_bo_va *bo_va;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		for (base = robj->vm_bo; base; base = base->next) {
+			bo_va = container_of(base, struct amdgpu_bo_va, base);
+			if (bo_va &&
+			    amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev))) {
+				r = -EINVAL;
+				amdgpu_bo_unreserve(robj);
+				goto out;
+			}
+		}
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3d221f0..eb242a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553795695-6065-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-28 19:18   ` Kuehling, Felix
       [not found]     ` <5744d324-0e7b-a19d-f4b5-a5242f664e8e-5C7GfCeVMHo@public.gmane.org>
  2019-03-29 10:47   ` Christian König
  1 sibling, 1 reply; 24+ messages in thread
From: Kuehling, Felix @ 2019-03-28 19:18 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>   2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 9ee8d7a..82dc2b6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -31,6 +31,7 @@
>   #include <drm/amdgpu_drm.h>
>   #include "amdgpu.h"
>   #include "amdgpu_display.h"
> +#include "amdgpu_xgmi.h"
>   
>   void amdgpu_gem_object_free(struct drm_gem_object *gobj)
>   {
> @@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   	struct amdgpu_device *adev = dev->dev_private;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_vm_bo_base *base;
> +	struct amdgpu_bo_va *bo_va;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		for (base = robj->vm_bo; base; base = base->next) {
> +			bo_va = container_of(base, struct amdgpu_bo_va, base);
> +			if (bo_va &&
> +			    amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev))) {

adev and robj->tbo.bdev are the same in each loop iteration. Shouldn't 
we get one of the devices from the bo_va or amdgpu_vm_bo_base?

Regards,
   Felix


> +				r = -EINVAL;
> +				amdgpu_bo_unreserve(robj);
> +				goto out;
> +			}
> +		}
> +
>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 3d221f0..eb242a1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]     ` <5744d324-0e7b-a19d-f4b5-a5242f664e8e-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-28 19:47       ` Liu, Shaoyun
       [not found]         ` <5187cc22-bf83-9617-d9df-c5ab1bca5735-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-28 19:47 UTC (permalink / raw)
  To: Kuehling, Felix, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 .

Regards

shaoyun.liu


On 2019-03-28 3:18 p.m., Kuehling, Felix wrote:
> 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 <shaoyun.liu@amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>    2 files changed, 15 insertions(+), 1 deletion(-)
>> I think we only care about the context device (adev)  and  the real device this bo been allocated ,
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index 9ee8d7a..82dc2b6 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -31,6 +31,7 @@
>>    #include <drm/amdgpu_drm.h>
>>    #include "amdgpu.h"
>>    #include "amdgpu_display.h"
>> +#include "amdgpu_xgmi.h"
>>    
>>    void amdgpu_gem_object_free(struct drm_gem_object *gobj)
>>    {
>> @@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>    	struct amdgpu_device *adev = dev->dev_private;
>>    	struct drm_amdgpu_gem_op *args = data;
>>    	struct drm_gem_object *gobj;
>> +	struct amdgpu_vm_bo_base *base;
>> +	struct amdgpu_bo_va *bo_va;
>>    	struct amdgpu_bo *robj;
>>    	int r;
>>    
>> @@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>    			amdgpu_bo_unreserve(robj);
>>    			break;
>>    		}
>> +		for (base = robj->vm_bo; base; base = base->next) {
>> +			bo_va = container_of(base, struct amdgpu_bo_va, base);
>> +			if (bo_va &&
>> +			    amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev))) {
> adev and robj->tbo.bdev are the same in each loop iteration. Shouldn't
> we get one of the devices from the bo_va or amdgpu_vm_bo_base?
>
> Regards,
>     Felix
>
>
>> +				r = -EINVAL;
>> +				amdgpu_bo_unreserve(robj);
>> +				goto out;
>> +			}
>> +		}
>> +
>>    		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>>    							AMDGPU_GEM_DOMAIN_GTT |
>>    							AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 3d221f0..eb242a1 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>>    	INIT_LIST_HEAD(&bo_va->valids);
>>    	INIT_LIST_HEAD(&bo_va->invalids);
>>    
>> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>    		bo_va->is_xgmi = true;
>>    		mutex_lock(&adev->vm_manager.lock_pstate);
>>    		/* Power up XGMI if it can be potentially used */
> _______________________________________________
> 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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]         ` <5187cc22-bf83-9617-d9df-c5ab1bca5735-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-28 19:58           ` Kuehling, Felix
  0 siblings, 0 replies; 24+ messages in thread
From: Kuehling, Felix @ 2019-03-28 19:58 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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  can move the same_hive  check out of the
> loop .

That doesn't make sense. The "same hive" check only makes sense if one 
of the devices is the one where the memory is physically located 
(robj->tbo.bdev), and the other one is where the memory is accessed 
from. That only makes sense inside the loop. The amdgpu_vm_bo_base 
should tell you the device that's mapping and potentially accessing the 
memory over XGMI. You could get it like this:

     mapping_adev = base->vm->root.base.bo->tbo.bdev;

Regards,
   Felix


>
> Regards
>
> shaoyun.liu
>
>
> On 2019-03-28 3:18 p.m., Kuehling, Felix wrote:
>> 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 <shaoyun.liu@amd.com>
>>> ---
>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>>     2 files changed, 15 insertions(+), 1 deletion(-)
>>> I think we only care about the context device (adev)  and  the real device this bo been allocated ,
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> index 9ee8d7a..82dc2b6 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>>> @@ -31,6 +31,7 @@
>>>     #include <drm/amdgpu_drm.h>
>>>     #include "amdgpu.h"
>>>     #include "amdgpu_display.h"
>>> +#include "amdgpu_xgmi.h"
>>>     
>>>     void amdgpu_gem_object_free(struct drm_gem_object *gobj)
>>>     {
>>> @@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>>     	struct amdgpu_device *adev = dev->dev_private;
>>>     	struct drm_amdgpu_gem_op *args = data;
>>>     	struct drm_gem_object *gobj;
>>> +	struct amdgpu_vm_bo_base *base;
>>> +	struct amdgpu_bo_va *bo_va;
>>>     	struct amdgpu_bo *robj;
>>>     	int r;
>>>     
>>> @@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>>     			amdgpu_bo_unreserve(robj);
>>>     			break;
>>>     		}
>>> +		for (base = robj->vm_bo; base; base = base->next) {
>>> +			bo_va = container_of(base, struct amdgpu_bo_va, base);
>>> +			if (bo_va &&
>>> +			    amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev))) {
>> adev and robj->tbo.bdev are the same in each loop iteration. Shouldn't
>> we get one of the devices from the bo_va or amdgpu_vm_bo_base?
>>
>> Regards,
>>      Felix
>>
>>
>>> +				r = -EINVAL;
>>> +				amdgpu_bo_unreserve(robj);
>>> +				goto out;
>>> +			}
>>> +		}
>>> +
>>>     		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>>>     							AMDGPU_GEM_DOMAIN_GTT |
>>>     							AMDGPU_GEM_DOMAIN_CPU);
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> index 3d221f0..eb242a1 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> @@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>>>     	INIT_LIST_HEAD(&bo_va->valids);
>>>     	INIT_LIST_HEAD(&bo_va->invalids);
>>>     
>>> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
>>> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
>>> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>>     		bo_va->is_xgmi = true;
>>>     		mutex_lock(&adev->vm_manager.lock_pstate);
>>>     		/* Power up XGMI if it can be potentially used */
>> _______________________________________________
>> 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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553795695-6065-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  2019-03-28 19:18   ` Kuehling, Felix
@ 2019-03-29 10:47   ` Christian König
  1 sibling, 0 replies; 24+ messages in thread
From: Christian König @ 2019-03-29 10:47 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>   2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 9ee8d7a..82dc2b6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -31,6 +31,7 @@
>   #include <drm/amdgpu_drm.h>
>   #include "amdgpu.h"
>   #include "amdgpu_display.h"
> +#include "amdgpu_xgmi.h"
>   
>   void amdgpu_gem_object_free(struct drm_gem_object *gobj)
>   {
> @@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   	struct amdgpu_device *adev = dev->dev_private;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_vm_bo_base *base;
> +	struct amdgpu_bo_va *bo_va;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		for (base = robj->vm_bo; base; base = base->next) {
> +			bo_va = container_of(base, struct amdgpu_bo_va, base);
> +			if (bo_va &&

bo_va can never be NULL here, apart from that looks good to me.

Christian.

> +			    amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev))) {
> +				r = -EINVAL;
> +				amdgpu_bo_unreserve(robj);
> +				goto out;
> +			}
> +		}
> +
>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 3d221f0..eb242a1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]     ` <a5df1503-edc9-f744-c340-4b45b243f29b-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-29 10:50       ` Christian König
  0 siblings, 0 replies; 24+ messages in thread
From: Christian König @ 2019-03-29 10:50 UTC (permalink / raw)
  To: Kuehling, Felix, Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> This patch is Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
>
> Please also give Christian a chance to review this one before you submit.

Looks good to me as well, feel free to also add my rb.

Christian.

>
> Thanks,
>     Felix
>
>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>    2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index 9ee8d7a..7b84036 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -31,6 +31,7 @@
>>    #include <drm/amdgpu_drm.h>
>>    #include "amdgpu.h"
>>    #include "amdgpu_display.h"
>> +#include "amdgpu_xgmi.h"
>>    
>>    void amdgpu_gem_object_free(struct drm_gem_object *gobj)
>>    {
>> @@ -666,6 +667,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>    	struct amdgpu_device *adev = dev->dev_private;
>>    	struct drm_amdgpu_gem_op *args = data;
>>    	struct drm_gem_object *gobj;
>> +	struct amdgpu_vm_bo_base *base;
>>    	struct amdgpu_bo *robj;
>>    	int r;
>>    
>> @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>    			amdgpu_bo_unreserve(robj);
>>    			break;
>>    		}
>> +		for (base = robj->vm_bo; base; base = base->next)
>> +			if (amdgpu_xgmi_same_hive(amdgpu_ttm_adev(robj->tbo.bdev),
>> +				amdgpu_ttm_adev(base->vm->root.base.bo->tbo.bdev))) {
>> +				r = -EINVAL;
>> +				amdgpu_bo_unreserve(robj);
>> +				goto out;
>> +			}
>> +
>> +
>>    		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>>    							AMDGPU_GEM_DOMAIN_GTT |
>>    							AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 3d221f0..eb242a1 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>>    	INIT_LIST_HEAD(&bo_va->valids);
>>    	INIT_LIST_HEAD(&bo_va->invalids);
>>    
>> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>    		bo_va->is_xgmi = true;
>>    		mutex_lock(&adev->vm_manager.lock_pstate);
>>    		/* Power up XGMI if it can be potentially used */
> _______________________________________________
> 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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553805488-15372-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-28 20:39   ` Kuehling, Felix
       [not found]     ` <a5df1503-edc9-f744-c340-4b45b243f29b-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Kuehling, Felix @ 2019-03-28 20:39 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>

This patch is Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>

Please also give Christian a chance to review this one before you submit.

Thanks,
   Felix


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>   2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 9ee8d7a..7b84036 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -31,6 +31,7 @@
>   #include <drm/amdgpu_drm.h>
>   #include "amdgpu.h"
>   #include "amdgpu_display.h"
> +#include "amdgpu_xgmi.h"
>   
>   void amdgpu_gem_object_free(struct drm_gem_object *gobj)
>   {
> @@ -666,6 +667,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   	struct amdgpu_device *adev = dev->dev_private;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_vm_bo_base *base;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		for (base = robj->vm_bo; base; base = base->next)
> +			if (amdgpu_xgmi_same_hive(amdgpu_ttm_adev(robj->tbo.bdev),
> +				amdgpu_ttm_adev(base->vm->root.base.bo->tbo.bdev))) {
> +				r = -EINVAL;
> +				amdgpu_bo_unreserve(robj);
> +				goto out;
> +			}
> +
> +
>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 3d221f0..eb242a1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-28 20:38 Liu, Shaoyun
       [not found] ` <1553805488-15372-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-28 20:38 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 9ee8d7a..7b84036 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -31,6 +31,7 @@
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
 #include "amdgpu_display.h"
+#include "amdgpu_xgmi.h"
 
 void amdgpu_gem_object_free(struct drm_gem_object *gobj)
 {
@@ -666,6 +667,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_device *adev = dev->dev_private;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_vm_bo_base *base;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		for (base = robj->vm_bo; base; base = base->next)
+			if (amdgpu_xgmi_same_hive(amdgpu_ttm_adev(robj->tbo.bdev),
+				amdgpu_ttm_adev(base->vm->root.base.bo->tbo.bdev))) {
+				r = -EINVAL;
+				amdgpu_bo_unreserve(robj);
+				goto out;
+			}
+
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3d221f0..eb242a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-28 20:29 Liu, Shaoyun
  0 siblings, 0 replies; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-28 20:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 14 ++++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 9ee8d7a..6a076d7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -31,6 +31,7 @@
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
 #include "amdgpu_display.h"
+#include "amdgpu_xgmi.h"
 
 void amdgpu_gem_object_free(struct drm_gem_object *gobj)
 {
@@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_device *adev = dev->dev_private;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_vm_bo_base *base;
+	struct amdgpu_bo_va *bo_va;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +707,17 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		for (base = robj->vm_bo; base; base = base->next) {
+			bo_va = container_of(base, struct amdgpu_bo_va, base);
+			if (bo_va &&
+			    amdgpu_xgmi_same_hive(amdgpu_ttm_adev(robj->tbo.bdev),
+					amdgpu_ttm_adev(bo_va->base.vm->root.base.bo->tbo.bdev))) {
+				r = -EINVAL;
+				amdgpu_bo_unreserve(robj);
+				goto out;
+			}
+		}
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3d221f0..eb242a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-28 20:27 Liu, Shaoyun
  0 siblings, 0 replies; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-28 20:27 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 9ee8d7a..7716ada 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -31,6 +31,7 @@
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
 #include "amdgpu_display.h"
+#include "amdgpu_xgmi.h"
 
 void amdgpu_gem_object_free(struct drm_gem_object *gobj)
 {
@@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_device *adev = dev->dev_private;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_vm_bo_base *base;
+	struct amdgpu_bo_va *bo_va;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		if (amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev)))
+			for (base = robj->vm_bo; base; base = base->next) {
+				bo_va = container_of(base, struct amdgpu_bo_va, base);
+				if (bo_va) {
+					r = -EINVAL;
+					amdgpu_bo_unreserve(robj);
+					goto out;
+				}
+			}
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3d221f0..eb242a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-28 19:53 Liu, Shaoyun
  0 siblings, 0 replies; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-28 19:53 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 13 +++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 9ee8d7a..7716ada 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -31,6 +31,7 @@
 #include <drm/amdgpu_drm.h>
 #include "amdgpu.h"
 #include "amdgpu_display.h"
+#include "amdgpu_xgmi.h"
 
 void amdgpu_gem_object_free(struct drm_gem_object *gobj)
 {
@@ -666,6 +667,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_device *adev = dev->dev_private;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_vm_bo_base *base;
+	struct amdgpu_bo_va *bo_va;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +707,16 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		if (amdgpu_xgmi_same_hive(adev,amdgpu_ttm_adev(robj->tbo.bdev)))
+			for (base = robj->vm_bo; base; base = base->next) {
+				bo_va = container_of(base, struct amdgpu_bo_va, base);
+				if (bo_va) {
+					r = -EINVAL;
+					amdgpu_bo_unreserve(robj);
+					goto out;
+				}
+			}
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3d221f0..eb242a1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2025,7 +2025,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]     ` <5e7addf1-61f7-a0f9-a709-5039ba1de840-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-27 16:24       ` Liu, Shaoyun
  0 siblings, 0 replies; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-27 16:24 UTC (permalink / raw)
  To: Kuehling, Felix, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 mapping will be disabled.
Remove the XGMI checking may affect other sharing mechanism.

Shaoyun.liu
  

On 2019-03-27 11:52 a.m., Kuehling, Felix wrote:
> 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 <shaoyun.liu@amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>    2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>    	struct amdgpu_device *adev = dev->dev_private;
>>    	struct drm_amdgpu_gem_op *args = data;
>>    	struct drm_gem_object *gobj;
>> +	struct amdgpu_vm_bo_base *base;
>> +	struct amdgpu_bo_va *bo_va;
>>    	struct amdgpu_bo *robj;
>>    	int r;
>>    
>> @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>>    			amdgpu_bo_unreserve(robj);
>>    			break;
>>    		}
>> +		for (base = robj->vm_bo; base; base = base->next) {
>> +			bo_va = container_of(base, struct amdgpu_bo_va, base);
>> +			if (bo_va && bo_va->is_xgmi) {
> The point here is to prevent transitions where a mapping moves from
> is_xgmi => !is_xgmi or from !is_xgmi => is_xgmi, because that would
> potentially require a XGMI pstate change.
>
> This check catches the case of is_xgmi => !is_xgmi, but not the other
> way around. I think you should drop the is_xgmi condition here. Any BO
> that's shared between multiple GPUs should return -EINVAL here because
> moving it could result in an XGMI pstate change. It doesn't matter
> whether it's currently using XGMI or not.
>
> Regards,
>     Felix
>
>> +				r = -EINVAL;
>> +				amdgpu_bo_unreserve(robj);
>> +				goto out;
>> +			}
>> +		}
>> +
>>    		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>>    							AMDGPU_GEM_DOMAIN_GTT |
>>    							AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>>    	INIT_LIST_HEAD(&bo_va->valids);
>>    	INIT_LIST_HEAD(&bo_va->invalids);
>>    
>> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>    		bo_va->is_xgmi = true;
>>    		mutex_lock(&adev->vm_manager.lock_pstate);
>>    		/* Power up XGMI if it can be potentially used */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553632516-23346-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  2019-03-27  7:41   ` Christian König
@ 2019-03-27 15:52   ` Kuehling, Felix
       [not found]     ` <5e7addf1-61f7-a0f9-a709-5039ba1de840-5C7GfCeVMHo@public.gmane.org>
  1 sibling, 1 reply; 24+ messages in thread
From: Kuehling, Felix @ 2019-03-27 15:52 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>   2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index a82c3b1..a0f56e4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   	struct amdgpu_device *adev = dev->dev_private;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_vm_bo_base *base;
> +	struct amdgpu_bo_va *bo_va;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		for (base = robj->vm_bo; base; base = base->next) {
> +			bo_va = container_of(base, struct amdgpu_bo_va, base);
> +			if (bo_va && bo_va->is_xgmi) {

The point here is to prevent transitions where a mapping moves from 
is_xgmi => !is_xgmi or from !is_xgmi => is_xgmi, because that would 
potentially require a XGMI pstate change.

This check catches the case of is_xgmi => !is_xgmi, but not the other 
way around. I think you should drop the is_xgmi condition here. Any BO 
that's shared between multiple GPUs should return -EINVAL here because 
moving it could result in an XGMI pstate change. It doesn't matter 
whether it's currently using XGMI or not.

Regards,
   Felix

> +				r = -EINVAL;
> +				amdgpu_bo_unreserve(robj);
> +				goto out;
> +			}
> +		}
> +
>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 76eee7e..8ed23d2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]                         ` <7a3199ec-c851-6b50-7e1f-b467e5e78d13-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-27 15:44                           ` Koenig, Christian
  0 siblings, 0 replies; 24+ messages in thread
From: Koenig, Christian @ 2019-03-27 15:44 UTC (permalink / raw)
  To: Liu, Shaoyun; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 4685 bytes --]

Yeah, feel free to add my RB.

Christian.

Am 27.03.2019 16:43 schrieb "Liu, Shaoyun" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:

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.

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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org><mailto:Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:

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 amdgpu_vm_bo_base    *next;

    /* protected by spinlock */
    struct list_head        vm_status;

    /* protected by the BO being reserved */
    bool                moved;
};

shaoyun.liu

On 2019-03-27 11:30 a.m., Koenig, Christian wrote:
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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org><mailto:Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:
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 none-vram
>> memory for peer device
>>
>> Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
>> Signed-off-by: shaoyunl <shaoyun.liu-5C7GfCeVMHo@public.gmane.org><mailto:shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev,
>> void *data,
>>       struct amdgpu_device *adev = dev->dev_private;
>>       struct drm_amdgpu_gem_op *args = data;
>>       struct drm_gem_object *gobj;
>> +    struct amdgpu_vm_bo_base *base;
>> +    struct amdgpu_bo_va *bo_va;
>>       struct amdgpu_bo *robj;
>>       int r;
>>   @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device
>> *dev, void *data,
>>               amdgpu_bo_unreserve(robj);
>>               break;
>>           }
>> +        for (base = robj->vm_bo; base; base = base->next) {
>> +            bo_va = container_of(base, struct amdgpu_bo_va, base);
>
> Please use list_for_each_entry here instead of open coding it.
>
> Christian.
>
>> +            if (bo_va && bo_va->is_xgmi) {
>> +                r = -EINVAL;
>> +                amdgpu_bo_unreserve(robj);
>> +                goto out;
>> +            }
>> +        }
>> +
>>           robj->preferred_domains = args->value &
>> (AMDGPU_GEM_DOMAIN_VRAM |
>>                               AMDGPU_GEM_DOMAIN_GTT |
>>                               AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct
>> amdgpu_device *adev,
>>       INIT_LIST_HEAD(&bo_va->valids);
>>       INIT_LIST_HEAD(&bo_va->invalids);
>>   -    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +        (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>           bo_va->is_xgmi = true;
>>           mutex_lock(&adev->vm_manager.lock_pstate);
>>           /* Power up XGMI if it can be potentially used */
>



_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[-- Attachment #1.2: Type: text/html, Size: 9178 bytes --]

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

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]                     ` <68f7ccfa-646e-492f-bdd7-b24f2e2029da-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
@ 2019-03-27 15:43                       ` Liu, Shaoyun
       [not found]                         ` <7a3199ec-c851-6b50-7e1f-b467e5e78d13-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-27 15:43 UTC (permalink / raw)
  To: Koenig, Christian; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 4548 bytes --]

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.

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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org><mailto:Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:

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 amdgpu_vm_bo_base    *next;

    /* protected by spinlock */
    struct list_head        vm_status;

    /* protected by the BO being reserved */
    bool                moved;
};

shaoyun.liu

On 2019-03-27 11:30 a.m., Koenig, Christian wrote:
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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org><mailto:Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:
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 none-vram
>> memory for peer device
>>
>> Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
>> Signed-off-by: shaoyunl <shaoyun.liu-5C7GfCeVMHo@public.gmane.org><mailto:shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev,
>> void *data,
>>       struct amdgpu_device *adev = dev->dev_private;
>>       struct drm_amdgpu_gem_op *args = data;
>>       struct drm_gem_object *gobj;
>> +    struct amdgpu_vm_bo_base *base;
>> +    struct amdgpu_bo_va *bo_va;
>>       struct amdgpu_bo *robj;
>>       int r;
>>   @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device
>> *dev, void *data,
>>               amdgpu_bo_unreserve(robj);
>>               break;
>>           }
>> +        for (base = robj->vm_bo; base; base = base->next) {
>> +            bo_va = container_of(base, struct amdgpu_bo_va, base);
>
> Please use list_for_each_entry here instead of open coding it.
>
> Christian.
>
>> +            if (bo_va && bo_va->is_xgmi) {
>> +                r = -EINVAL;
>> +                amdgpu_bo_unreserve(robj);
>> +                goto out;
>> +            }
>> +        }
>> +
>>           robj->preferred_domains = args->value &
>> (AMDGPU_GEM_DOMAIN_VRAM |
>>                               AMDGPU_GEM_DOMAIN_GTT |
>>                               AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct
>> amdgpu_device *adev,
>>       INIT_LIST_HEAD(&bo_va->valids);
>>       INIT_LIST_HEAD(&bo_va->invalids);
>>   -    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +        (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>           bo_va->is_xgmi = true;
>>           mutex_lock(&adev->vm_manager.lock_pstate);
>>           /* Power up XGMI if it can be potentially used */
>



_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[-- Attachment #1.2: Type: text/html, Size: 8930 bytes --]

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

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]                 ` <fd7f4b68-26c2-d0ea-b254-fbc61a0d3956-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-27 15:39                   ` Koenig, Christian
       [not found]                     ` <68f7ccfa-646e-492f-bdd7-b24f2e2029da-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Koenig, Christian @ 2019-03-27 15:39 UTC (permalink / raw)
  To: Liu, Shaoyun; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 4014 bytes --]

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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:

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 amdgpu_vm_bo_base    *next;

    /* protected by spinlock */
    struct list_head        vm_status;

    /* protected by the BO being reserved */
    bool                moved;
};

shaoyun.liu

On 2019-03-27 11:30 a.m., Koenig, Christian wrote:
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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org><mailto:Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:
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 none-vram
>> memory for peer device
>>
>> Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
>> Signed-off-by: shaoyunl <shaoyun.liu-5C7GfCeVMHo@public.gmane.org><mailto:shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev,
>> void *data,
>>       struct amdgpu_device *adev = dev->dev_private;
>>       struct drm_amdgpu_gem_op *args = data;
>>       struct drm_gem_object *gobj;
>> +    struct amdgpu_vm_bo_base *base;
>> +    struct amdgpu_bo_va *bo_va;
>>       struct amdgpu_bo *robj;
>>       int r;
>>   @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device
>> *dev, void *data,
>>               amdgpu_bo_unreserve(robj);
>>               break;
>>           }
>> +        for (base = robj->vm_bo; base; base = base->next) {
>> +            bo_va = container_of(base, struct amdgpu_bo_va, base);
>
> Please use list_for_each_entry here instead of open coding it.
>
> Christian.
>
>> +            if (bo_va && bo_va->is_xgmi) {
>> +                r = -EINVAL;
>> +                amdgpu_bo_unreserve(robj);
>> +                goto out;
>> +            }
>> +        }
>> +
>>           robj->preferred_domains = args->value &
>> (AMDGPU_GEM_DOMAIN_VRAM |
>>                               AMDGPU_GEM_DOMAIN_GTT |
>>                               AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct
>> amdgpu_device *adev,
>>       INIT_LIST_HEAD(&bo_va->valids);
>>       INIT_LIST_HEAD(&bo_va->invalids);
>>   -    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +        (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>           bo_va->is_xgmi = true;
>>           mutex_lock(&adev->vm_manager.lock_pstate);
>>           /* Power up XGMI if it can be potentially used */
>

[-- Attachment #1.2: Type: text/html, Size: 7871 bytes --]

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

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]             ` <3e28a7df-4165-4bde-8a2e-926453ceb1d1-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
@ 2019-03-27 15:34               ` Liu, Shaoyun
       [not found]                 ` <fd7f4b68-26c2-d0ea-b254-fbc61a0d3956-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-27 15:34 UTC (permalink / raw)
  To: Koenig, Christian; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3649 bytes --]

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 amdgpu_vm_bo_base    *next;

    /* protected by spinlock */
    struct list_head        vm_status;

    /* protected by the BO being reserved */
    bool                moved;
};

shaoyun.liu

On 2019-03-27 11:30 a.m., Koenig, Christian wrote:
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" <Shaoyun.Liu@amd.com><mailto:Shaoyun.Liu@amd.com>:
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 none-vram
>> memory for peer device
>>
>> Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
>> Signed-off-by: shaoyunl <shaoyun.liu@amd.com><mailto:shaoyun.liu@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev,
>> void *data,
>>       struct amdgpu_device *adev = dev->dev_private;
>>       struct drm_amdgpu_gem_op *args = data;
>>       struct drm_gem_object *gobj;
>> +    struct amdgpu_vm_bo_base *base;
>> +    struct amdgpu_bo_va *bo_va;
>>       struct amdgpu_bo *robj;
>>       int r;
>>   @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device
>> *dev, void *data,
>>               amdgpu_bo_unreserve(robj);
>>               break;
>>           }
>> +        for (base = robj->vm_bo; base; base = base->next) {
>> +            bo_va = container_of(base, struct amdgpu_bo_va, base);
>
> Please use list_for_each_entry here instead of open coding it.
>
> Christian.
>
>> +            if (bo_va && bo_va->is_xgmi) {
>> +                r = -EINVAL;
>> +                amdgpu_bo_unreserve(robj);
>> +                goto out;
>> +            }
>> +        }
>> +
>>           robj->preferred_domains = args->value &
>> (AMDGPU_GEM_DOMAIN_VRAM |
>>                               AMDGPU_GEM_DOMAIN_GTT |
>>                               AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct
>> amdgpu_device *adev,
>>       INIT_LIST_HEAD(&bo_va->valids);
>>       INIT_LIST_HEAD(&bo_va->invalids);
>>   -    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +        (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>           bo_va->is_xgmi = true;
>>           mutex_lock(&adev->vm_manager.lock_pstate);
>>           /* Power up XGMI if it can be potentially used */
>

[-- Attachment #1.2: Type: text/html, Size: 7315 bytes --]

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

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]         ` <5d6e562d-012b-f22b-7ec9-2fdf33a9319d-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-27 15:30           ` Koenig, Christian
       [not found]             ` <3e28a7df-4165-4bde-8a2e-926453ceb1d1-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Koenig, Christian @ 2019-03-27 15:30 UTC (permalink / raw)
  To: Liu, Shaoyun; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3076 bytes --]

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" <Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>:
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 none-vram
>> memory for peer device
>>
>> Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
>> Signed-off-by: shaoyunl <shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev,
>> void *data,
>>       struct amdgpu_device *adev = dev->dev_private;
>>       struct drm_amdgpu_gem_op *args = data;
>>       struct drm_gem_object *gobj;
>> +    struct amdgpu_vm_bo_base *base;
>> +    struct amdgpu_bo_va *bo_va;
>>       struct amdgpu_bo *robj;
>>       int r;
>>   @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device
>> *dev, void *data,
>>               amdgpu_bo_unreserve(robj);
>>               break;
>>           }
>> +        for (base = robj->vm_bo; base; base = base->next) {
>> +            bo_va = container_of(base, struct amdgpu_bo_va, base);
>
> Please use list_for_each_entry here instead of open coding it.
>
> Christian.
>
>> +            if (bo_va && bo_va->is_xgmi) {
>> +                r = -EINVAL;
>> +                amdgpu_bo_unreserve(robj);
>> +                goto out;
>> +            }
>> +        }
>> +
>>           robj->preferred_domains = args->value &
>> (AMDGPU_GEM_DOMAIN_VRAM |
>>                               AMDGPU_GEM_DOMAIN_GTT |
>>                               AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct
>> amdgpu_device *adev,
>>       INIT_LIST_HEAD(&bo_va->valids);
>>       INIT_LIST_HEAD(&bo_va->invalids);
>>   -    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +    if (bo && amdgpu_xgmi_same_hive(adev,
>> amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +        (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>           bo_va->is_xgmi = true;
>>           mutex_lock(&adev->vm_manager.lock_pstate);
>>           /* Power up XGMI if it can be potentially used */
>

[-- Attachment #1.2: Type: text/html, Size: 6076 bytes --]

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

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found]     ` <c42cc872-cddf-01b9-b46e-b2084f8a1bc3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2019-03-27 15:22       ` Liu, Shaoyun
       [not found]         ` <5d6e562d-012b-f22b-7ec9-2fdf33a9319d-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-27 15:22 UTC (permalink / raw)
  To: Koenig, Christian, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 none-vram 
>> memory for peer device
>>
>> Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
>> Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>>   2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index a82c3b1..a0f56e4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, 
>> void *data,
>>       struct amdgpu_device *adev = dev->dev_private;
>>       struct drm_amdgpu_gem_op *args = data;
>>       struct drm_gem_object *gobj;
>> +    struct amdgpu_vm_bo_base *base;
>> +    struct amdgpu_bo_va *bo_va;
>>       struct amdgpu_bo *robj;
>>       int r;
>>   @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device 
>> *dev, void *data,
>>               amdgpu_bo_unreserve(robj);
>>               break;
>>           }
>> +        for (base = robj->vm_bo; base; base = base->next) {
>> +            bo_va = container_of(base, struct amdgpu_bo_va, base);
>
> Please use list_for_each_entry here instead of open coding it.
>
> Christian.
>
>> +            if (bo_va && bo_va->is_xgmi) {
>> +                r = -EINVAL;
>> +                amdgpu_bo_unreserve(robj);
>> +                goto out;
>> +            }
>> +        }
>> +
>>           robj->preferred_domains = args->value & 
>> (AMDGPU_GEM_DOMAIN_VRAM |
>>                               AMDGPU_GEM_DOMAIN_GTT |
>>                               AMDGPU_GEM_DOMAIN_CPU);
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 76eee7e..8ed23d2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct 
>> amdgpu_device *adev,
>>       INIT_LIST_HEAD(&bo_va->valids);
>>       INIT_LIST_HEAD(&bo_va->invalids);
>>   -    if (bo && amdgpu_xgmi_same_hive(adev, 
>> amdgpu_ttm_adev(bo->tbo.bdev))) {
>> +    if (bo && amdgpu_xgmi_same_hive(adev, 
>> amdgpu_ttm_adev(bo->tbo.bdev)) &&
>> +        (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>>           bo_va->is_xgmi = true;
>>           mutex_lock(&adev->vm_manager.lock_pstate);
>>           /* Power up XGMI if it can be potentially used */
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553632516-23346-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-27  7:41   ` Christian König
       [not found]     ` <c42cc872-cddf-01b9-b46e-b2084f8a1bc3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2019-03-27 15:52   ` Kuehling, Felix
  1 sibling, 1 reply; 24+ messages in thread
From: Christian König @ 2019-03-27  7:41 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
>   2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index a82c3b1..a0f56e4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   	struct amdgpu_device *adev = dev->dev_private;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_vm_bo_base *base;
> +	struct amdgpu_bo_va *bo_va;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		for (base = robj->vm_bo; base; base = base->next) {
> +			bo_va = container_of(base, struct amdgpu_bo_va, base);

Please use list_for_each_entry here instead of open coding it.

Christian.

> +			if (bo_va && bo_va->is_xgmi) {
> +				r = -EINVAL;
> +				amdgpu_bo_unreserve(robj);
> +				goto out;
> +			}
> +		}
> +
>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 76eee7e..8ed23d2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */

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

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

* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-26 20:35 Liu, Shaoyun
       [not found] ` <1553632516-23346-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-26 20:35 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index a82c3b1..a0f56e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -666,6 +666,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 	struct amdgpu_device *adev = dev->dev_private;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_vm_bo_base *base;
+	struct amdgpu_bo_va *bo_va;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +706,15 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		for (base = robj->vm_bo; base; base = base->next) {
+			bo_va = container_of(base, struct amdgpu_bo_va, base);
+			if (bo_va && bo_va->is_xgmi) {
+				r = -EINVAL;
+				amdgpu_bo_unreserve(robj);
+				goto out;
+			}
+		}
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 76eee7e..8ed23d2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553626381-23351-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  2019-03-26 19:12   ` Christian König
@ 2019-03-26 20:02   ` Kuehling, Felix
  1 sibling, 0 replies; 24+ messages in thread
From: Kuehling, Felix @ 2019-03-26 20:02 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 +++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  | 3 ++-
>   2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index a82c3b1..3c7ee71 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -664,8 +664,10 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			struct drm_file *filp)
>   {
>   	struct amdgpu_device *adev = dev->dev_private;
> +	struct amdgpu_fpriv *fpriv = filp->driver_priv;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_bo_va *bo_va;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +706,13 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		bo_va = amdgpu_vm_bo_find(&fpriv->vm, robj);
> +		if (bo_va && bo_va->is_xgmi) {
> +			r = -EINVAL;
> +			amdgpu_bo_unreserve(robj);
> +			break;
> +		}
> +

Hmm, from the other discussion, GEM doesn't really support P2P of VRAM 
BOs between GPUs right now. The only way this function can affect a BO 
that's P2P shared is, if the BO is allocated with GEM and then imported 
into KFD. In that case you'll need to take into account mappings of the 
imported BO in all the KFD VMs, not the VMs in the fpriv->vm.

In other words, you need to find all bo_vas of the BO in all VMs and for 
each one check, whether it has is_xgmi set.

Regards,
   Felix


>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 76eee7e..f08dda2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains == AMDGPU_GEM_DOMAIN_VRAM)) {
>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
       [not found] ` <1553626381-23351-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
@ 2019-03-26 19:12   ` Christian König
  2019-03-26 20:02   ` Kuehling, Felix
  1 sibling, 0 replies; 24+ messages in thread
From: Christian König @ 2019-03-26 19:12 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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 <shaoyun.liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 +++++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  | 3 ++-
>   2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index a82c3b1..3c7ee71 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -664,8 +664,10 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			struct drm_file *filp)
>   {
>   	struct amdgpu_device *adev = dev->dev_private;
> +	struct amdgpu_fpriv *fpriv = filp->driver_priv;
>   	struct drm_amdgpu_gem_op *args = data;
>   	struct drm_gem_object *gobj;
> +	struct amdgpu_bo_va *bo_va;
>   	struct amdgpu_bo *robj;
>   	int r;
>   
> @@ -704,6 +706,13 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
>   			amdgpu_bo_unreserve(robj);
>   			break;
>   		}
> +		bo_va = amdgpu_vm_bo_find(&fpriv->vm, robj);
> +		if (bo_va && bo_va->is_xgmi) {
> +			r = -EINVAL;
> +			amdgpu_bo_unreserve(robj);
> +			break;
> +		}
> +
>   		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
>   							AMDGPU_GEM_DOMAIN_GTT |
>   							AMDGPU_GEM_DOMAIN_CPU);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 76eee7e..f08dda2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
>   	INIT_LIST_HEAD(&bo_va->valids);
>   	INIT_LIST_HEAD(&bo_va->invalids);
>   
> -	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
> +	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
> +	    (bo->preferred_domains == AMDGPU_GEM_DOMAIN_VRAM)) {

This is a bit mask, so better change this to "bo->preferred_domains & 
AMDGPU_GEM_DOMAIN_VRAM".

With that done the patch is Reviewed-by: Christian König 
<christian.koenig@amd.com>.

Christian.

>   		bo_va->is_xgmi = true;
>   		mutex_lock(&adev->vm_manager.lock_pstate);
>   		/* Power up XGMI if it can be potentially used */

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

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

* [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state
@ 2019-03-26 18:54 Liu, Shaoyun
       [not found] ` <1553626381-23351-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Liu, Shaoyun @ 2019-03-26 18:54 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Shaoyun

Avoid unnecessary XGMI hight pstate trigger when mapping none-vram memory for peer device

Change-Id: I1881deff3da19f1f4b58d5765db03a590092a5b2
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 9 +++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index a82c3b1..3c7ee71 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -664,8 +664,10 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			struct drm_file *filp)
 {
 	struct amdgpu_device *adev = dev->dev_private;
+	struct amdgpu_fpriv *fpriv = filp->driver_priv;
 	struct drm_amdgpu_gem_op *args = data;
 	struct drm_gem_object *gobj;
+	struct amdgpu_bo_va *bo_va;
 	struct amdgpu_bo *robj;
 	int r;
 
@@ -704,6 +706,13 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
 			amdgpu_bo_unreserve(robj);
 			break;
 		}
+		bo_va = amdgpu_vm_bo_find(&fpriv->vm, robj);
+		if (bo_va && bo_va->is_xgmi) {
+			r = -EINVAL;
+			amdgpu_bo_unreserve(robj);
+			break;
+		}
+
 		robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
 							AMDGPU_GEM_DOMAIN_GTT |
 							AMDGPU_GEM_DOMAIN_CPU);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 76eee7e..f08dda2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2048,7 +2048,8 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&bo_va->valids);
 	INIT_LIST_HEAD(&bo_va->invalids);
 
-	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev))) {
+	if (bo && amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+	    (bo->preferred_domains == AMDGPU_GEM_DOMAIN_VRAM)) {
 		bo_va->is_xgmi = true;
 		mutex_lock(&adev->vm_manager.lock_pstate);
 		/* Power up XGMI if it can be potentially used */
-- 
2.7.4

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

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

end of thread, other threads:[~2019-03-29 10:50 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 17:55 [PATCH] drm/amdgpu: Add preferred_domain check when determine XGMI state Liu, Shaoyun
     [not found] ` <1553795695-6065-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-03-28 19:18   ` Kuehling, Felix
     [not found]     ` <5744d324-0e7b-a19d-f4b5-a5242f664e8e-5C7GfCeVMHo@public.gmane.org>
2019-03-28 19:47       ` Liu, Shaoyun
     [not found]         ` <5187cc22-bf83-9617-d9df-c5ab1bca5735-5C7GfCeVMHo@public.gmane.org>
2019-03-28 19:58           ` Kuehling, Felix
2019-03-29 10:47   ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2019-03-28 20:38 Liu, Shaoyun
     [not found] ` <1553805488-15372-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-03-28 20:39   ` Kuehling, Felix
     [not found]     ` <a5df1503-edc9-f744-c340-4b45b243f29b-5C7GfCeVMHo@public.gmane.org>
2019-03-29 10:50       ` Christian König
2019-03-28 20:29 Liu, Shaoyun
2019-03-28 20:27 Liu, Shaoyun
2019-03-28 19:53 Liu, Shaoyun
2019-03-26 20:35 Liu, Shaoyun
     [not found] ` <1553632516-23346-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-03-27  7:41   ` Christian König
     [not found]     ` <c42cc872-cddf-01b9-b46e-b2084f8a1bc3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-03-27 15:22       ` Liu, Shaoyun
     [not found]         ` <5d6e562d-012b-f22b-7ec9-2fdf33a9319d-5C7GfCeVMHo@public.gmane.org>
2019-03-27 15:30           ` Koenig, Christian
     [not found]             ` <3e28a7df-4165-4bde-8a2e-926453ceb1d1-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2019-03-27 15:34               ` Liu, Shaoyun
     [not found]                 ` <fd7f4b68-26c2-d0ea-b254-fbc61a0d3956-5C7GfCeVMHo@public.gmane.org>
2019-03-27 15:39                   ` Koenig, Christian
     [not found]                     ` <68f7ccfa-646e-492f-bdd7-b24f2e2029da-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2019-03-27 15:43                       ` Liu, Shaoyun
     [not found]                         ` <7a3199ec-c851-6b50-7e1f-b467e5e78d13-5C7GfCeVMHo@public.gmane.org>
2019-03-27 15:44                           ` Koenig, Christian
2019-03-27 15:52   ` Kuehling, Felix
     [not found]     ` <5e7addf1-61f7-a0f9-a709-5039ba1de840-5C7GfCeVMHo@public.gmane.org>
2019-03-27 16:24       ` Liu, Shaoyun
2019-03-26 18:54 Liu, Shaoyun
     [not found] ` <1553626381-23351-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org>
2019-03-26 19:12   ` Christian König
2019-03-26 20:02   ` Kuehling, Felix

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.