AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhao, Yong" <Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
To: "Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: Add more page fault info printing for GFX10
Date: Mon, 12 Aug 2019 19:20:48 +0000	[thread overview]
Message-ID: <2da6884f-fcbf-e1ba-9150-28609dd16c2b@amd.com> (raw)
In-Reply-To: <b8fd8285-12f8-373d-022f-e846dbb99efc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi Christian,

I feel with ":" it is better, because without it I found it is not easy 
to interpret the printing. Moreover, it continues the format of the 
former part.

It looks like this:

[  190.686668] amdgpu 0000:03:00.0: [gfxhub0] retry page fault (src_id:0 
ring:0 vmid:8 pasid:32771, for process:kfdtest pid:3273 thread:kfdtest 
pid:3273)

vs without ":"

[  190.686668] amdgpu 0000:03:00.0: [gfxhub0] retry page fault (src_id:0 
ring:0 vmid:8 pasid:32771, for process kfdtest pid 3273 thread kfdtest 
pid 3273)


If you are not convinced, I can change it to without ":".


Regards,

Yong

On 2019-08-12 3:12 p.m., Christian König wrote:
> Am 12.08.19 um 21:05 schrieb Zhao, Yong:
>> The printing we did for GFX9 was not propogated to GFX10 somehow, so fix
>> it now.
>>
>> Change-Id: Ic0b8381134340b83cd69c3fe186ac7a8a97b1bca
>> Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 33 ++++++++++++++++++++++----
>>   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c  |  5 +++-
>>   2 files changed, 32 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
>> index 4e3ac1084a94..f23be98e9897 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
>> @@ -140,17 +140,40 @@ static int gmc_v10_0_process_interrupt(struct 
>> amdgpu_device *adev,
>>       }
>>         if (printk_ratelimit()) {
>> +        struct amdgpu_task_info task_info;
>> +
>> +        memset(&task_info, 0, sizeof(struct amdgpu_task_info));
>> +        amdgpu_vm_get_task_info(adev, entry->pasid, &task_info);
>> +
>>           dev_err(adev->dev,
>> -            "[%s] VMC page fault (src_id:%u ring:%u vmid:%u 
>> pasid:%u)\n",
>> +            "[%s] page fault (src_id:%u ring:%u vmid:%u pasid:%u, "
>> +            "for process:%s pid:%d thread:%s pid:%d)\n",
>>               entry->vmid_src ? "mmhub" : "gfxhub",
>>               entry->src_id, entry->ring_id, entry->vmid,
>> -            entry->pasid);
>> -        dev_err(adev->dev, "  at page 0x%016llx from %d\n",
>> +            entry->pasid, task_info.process_name, task_info.tgid,
>> +            task_info.task_name, task_info.pid);
>> +        dev_err(adev->dev, "  in page starting at address 0x%016llx 
>> from client %d\n",
>>               addr, entry->client_id);
>> -        if (!amdgpu_sriov_vf(adev))
>> +        if (!amdgpu_sriov_vf(adev)) {
>>               dev_err(adev->dev,
>> -                "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> +                "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>                   status);
>> +            dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n",
>> +                REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS));
>> +            dev_err(adev->dev, "\t WALKER_ERROR: 0x%lx\n",
>> +                REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, WALKER_ERROR));
>> +            dev_err(adev->dev, "\t PERMISSION_FAULTS: 0x%lx\n",
>> +                REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, PERMISSION_FAULTS));
>> +            dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n",
>> +                REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR));
>> +            dev_err(adev->dev, "\t RW: 0x%lx\n",
>> +                REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, RW));
>> +        }
>>       }
>>         return 0;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c 
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index 296e2d982578..34c4c2d08550 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -364,7 +364,7 @@ static int gmc_v9_0_process_interrupt(struct 
>> amdgpu_device *adev,
>>             dev_err(adev->dev,
>>               "[%s] %s page fault (src_id:%u ring:%u vmid:%u "
>> -            "pasid:%u, for process %s pid %d thread %s pid %d)\n",
>> +            "pasid:%u, for process:%s pid:%d thread:%s pid:%d)\n",
>
> I think the text actually looks better without the ":".
>
>>               hub_name, retry_fault ? "retry" : "no-retry",
>>               entry->src_id, entry->ring_id, entry->vmid,
>>               entry->pasid, task_info.process_name, task_info.tgid,
>> @@ -387,6 +387,9 @@ static int gmc_v9_0_process_interrupt(struct 
>> amdgpu_device *adev,
>>               dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n",
>>                   REG_GET_FIELD(status,
>>                   VM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR));
>> +            dev_err(adev->dev, "\t RW: 0x%lx\n",
>> +                REG_GET_FIELD(status,
>> +                VM_L2_PROTECTION_FAULT_STATUS, RW));
>
> That should probably be a separate patch since it is fixing gfx9.
>
> Apart from that the patch looks good to me,
> Christian.
>
>>             }
>>       }
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-08-12 19:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 19:05 [PATCH] drm/amdgpu: Add more page fault info printing for GFX10 Zhao, Yong
     [not found] ` <20190812190536.22744-1-Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
2019-08-12 19:12   ` Christian König
     [not found]     ` <b8fd8285-12f8-373d-022f-e846dbb99efc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-08-12 19:20       ` Zhao, Yong [this message]
     [not found]         ` <2da6884f-fcbf-e1ba-9150-28609dd16c2b-5C7GfCeVMHo@public.gmane.org>
2019-08-12 19:29           ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2da6884f-fcbf-e1ba-9150-28609dd16c2b@amd.com \
    --to=yong.zhao-5c7gfcevmho@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox