From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhao, Yong" Subject: Re: [PATCH 6/6] drm/amdkfd: Improve KFD IOCTL printing Date: Mon, 30 Sep 2019 18:05:33 +0000 Message-ID: References: <20190928034132.28340-1-Yong.Zhao@amd.com> <20190928034132.28340-6-Yong.Zhao@amd.com>, <30b9f4d8-0365-27fb-b6b4-ba2d20b9cb81@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1821909814==" Return-path: In-Reply-To: <30b9f4d8-0365-27fb-b6b4-ba2d20b9cb81-5C7GfCeVMHo@public.gmane.org> Content-Language: en-US List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "amd-gfx" To: "Kuehling, Felix" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" --===============1821909814== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM6PR12MB27786C334D48B9EC6329B68CF0820DM6PR12MB2778namp_" --_000_DM6PR12MB27786C334D48B9EC6329B68CF0820DM6PR12MB2778namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Okay, I will change dev_err back to dev_dbg. The hex printing is still very= useful. Yong ________________________________ From: Kuehling, Felix Sent: Monday, September 30, 2019 11:47 AM To: Zhao, Yong ; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Subject: Re: [PATCH 6/6] drm/amdkfd: Improve KFD IOCTL printing On 2019-09-27 11:41 p.m., Zhao, Yong wrote: > The code use hex define, so should the printing. Also, printf a message > if there is a failure. > > Change-Id: Ia7cc7690553bb043915b3d8c0157216c64421a60 > Signed-off-by: Yong Zhao > --- > drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/a= md/amdkfd/kfd_chardev.c > index c28ba0c1d7ac..d1ab09c0f522 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c > @@ -1840,7 +1840,7 @@ static long kfd_ioctl(struct file *filep, unsigned = int cmd, unsigned long arg) > } else > goto err_i1; > > - dev_dbg(kfd_device, "ioctl cmd 0x%x (#%d), arg 0x%lx\n", cmd, nr, a= rg); > + dev_dbg(kfd_device, "ioctl cmd 0x%x (#0x%x), arg 0x%lx\n", cmd, nr,= arg); > > process =3D kfd_get_process(current); > if (IS_ERR(process)) { > @@ -1895,7 +1895,8 @@ static long kfd_ioctl(struct file *filep, unsigned = int cmd, unsigned long arg) > kfree(kdata); > > if (retcode) > - dev_dbg(kfd_device, "ret =3D %d\n", retcode); > + dev_err(kfd_device, "ioctl cmd (#0x%x), arg 0x%lx, ret =3D = %d\n", > + nr, arg, retcode); NAK. We don't want to spam the kernel log with cryptic error messages every time ioctl functions fail. Please leave this as a dev_dbg message. Failing ioctl functions could be perfectly normal for a number of reasons (system call interrupted by signal, running out of event slots, timeouts on event waiting, etc). But every bug report will incorrectly blame any unrelated problem on those messages if they happen to appear in the kernel log. Regards, Felix > > return retcode; > } --_000_DM6PR12MB27786C334D48B9EC6329B68CF0820DM6PR12MB2778namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Okay, I will change dev_err back to dev_dbg. The hex printing is still very useful.

Y= ong

From: Kuehling, Felix <F= elix.Kuehling-5C7GfCeVMHo@public.gmane.org>
Sent: Monday, September 30, 2019 11:47 AM
To: Zhao, Yong <Yong.Zhao-5C7GfCeVMHo@public.gmane.org>; amd-gfx-PD4FTy7X32lNgt0PjOBp9/rsn8yoX9R0@public.gmane.org= org <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 6/6] drm/amdkfd: Improve KFD IOCTL printing
 
On 2019-09-27 11:41 p.m., Zhao, Yong wrote:
> The code use hex define, so should the printing. Also, printf a messag= e
> if there is a failure.
>
> Change-Id: Ia7cc7690553bb043915b3d8c0157216c64421a60
> Signed-off-by: Yong Zhao <Yong.Zhao-5C7GfCeVMHo@public.gmane.org>
> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 ++= 3;--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/dr= m/amd/amdkfd/kfd_chardev.c
> index c28ba0c1d7ac..d1ab09c0f522 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -1840,7 +1840,7 @@ static long kfd_ioctl(struct file *filep, un= signed int cmd, unsigned long arg)
>        } else
>            = ;    goto err_i1;
>  
> -     dev_dbg(kfd_device, "ioctl cmd 0x%x (#%= d), arg 0x%lx\n", cmd, nr, arg);
> +     dev_dbg(kfd_device, "ioctl cmd 0x%x= (#0x%x), arg 0x%lx\n", cmd, nr, arg);
>  
>        process =3D kfd_get_process(= current);
>        if (IS_ERR(process)) {
> @@ -1895,7 +1895,8 @@ static long kfd_ioctl(struct file *filep, un= signed int cmd, unsigned long arg)
>            = ;    kfree(kdata);
>  
>        if (retcode)
> -           &nb= sp; dev_dbg(kfd_device, "ret =3D %d\n", retcode);
> +           = ;  dev_err(kfd_device, "ioctl cmd (#0x%x), arg 0x%lx, ret =3D %d\= n",
> +           = ;            &n= bsp;     nr, arg, retcode);

NAK. We don't want to spam the kernel log with cryptic error messages
every time ioctl functions fail. Please leave this as a dev_dbg message. Failing ioctl functions could be perfectly normal for a number of
reasons (system call interrupted by signal, running out of event slots, timeouts on event waiting, etc). But every bug report will incorrectly
blame any unrelated problem on those messages if they happen to appear
in the kernel log.

Regards,
   Felix


>  
>        return retcode;
>   }
--_000_DM6PR12MB27786C334D48B9EC6329B68CF0820DM6PR12MB2778namp_-- --===============1821909814== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYW1kLWdmeCBt YWlsaW5nIGxpc3QKYW1kLWdmeEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9hbWQtZ2Z4 --===============1821909814==--