All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: amd-gfx@lists.freedesktop.org, "Kasiviswanathan,
	Harish" <Harish.Kasiviswanathan@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Print node id in peer map failure message
Date: Wed, 16 Feb 2022 12:08:25 -0500	[thread overview]
Message-ID: <d7422e30-a926-a723-f30c-b414f42075be@amd.com> (raw)
In-Reply-To: <20220216014252.182719-1-Harish.Kasiviswanathan@amd.com>

Am 2022-02-15 um 20:42 schrieb Harish Kasiviswanathan:
> Print alloc node, peer node and memory domain when peer map fails. This
> is more useful
>
> Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
> ---
>   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/amd/amdkfd/kfd_chardev.c
> index 965af2a08bc0..4d62784c7cc3 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -1215,8 +1215,9 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
>   			peer_pdd->dev->adev, (struct kgd_mem *)mem,
>   			peer_pdd->drm_priv, &table_freed);
>   		if (err) {
> -			pr_err("Failed to map to gpu %d/%d\n",
> -			       i, args->n_devices);
> +			pr_err("Failed to map peer:%d alloc:%d domain:%d\n",
> +			       peer_pdd->dev->id, dev->id,

Not sure if the dev->id is the most descriptive way to name the GPU 
because none of our user mode tools really expose that number. If you 
use dev_err instead of pr_err, you get a nicer way of printing one of 
the devices for free (probably the dev->adev->dev). For the peer you 
could manually print the PCI B:D.F.

Regards,
   Felix


> +			       ((struct kgd_mem *)mem)->domain);
>   			goto map_memory_to_gpu_failed;
>   		}
>   		args->n_success = i+1;

  reply	other threads:[~2022-02-16 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16  1:42 [PATCH] drm/amdgpu: Print node id in peer map failure message Harish Kasiviswanathan
2022-02-16 17:08 ` Felix Kuehling [this message]
2022-02-22 18:55   ` [PATCH v2] drm/amdkfd: Print bdf " Harish Kasiviswanathan
2022-02-22 18:58     ` Alex Deucher
2022-02-22 20:01     ` Felix Kuehling

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=d7422e30-a926-a723-f30c-b414f42075be@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Harish.Kasiviswanathan@amd.com \
    --cc=amd-gfx@lists.freedesktop.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 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.