AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Zhu <jamesz@amd.com>
To: Philip Yang <Philip.Yang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Felix.Kuehling@amd.com
Subject: Re: [PATCH v2 3/4] drm/amdkfd: Increase SMI event fifo size
Date: Thu, 22 Aug 2024 10:34:17 -0400	[thread overview]
Message-ID: <478425e7-ce6b-4573-9119-c40b555bd6df@amd.com> (raw)
In-Reply-To: <20240730201547.13590-4-Philip.Yang@amd.com>


On 2024-07-30 16:15, Philip Yang wrote:
> SMI event fifo size 1KB was enough to report GPU vm fault or reset
[JZ] There is a typo here. it should be NOT enough.
> event, increase it to 8KB to store about 100 migrate events, less chance
> to drop the migrate events if lots of migration happened in the short
> period of time. Add KFD prefix to the macro name.
>
> Signed-off-by: Philip Yang <Philip.Yang@amd.com>
> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> index 1d94b445a060..9b8169761ec5 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
> @@ -44,7 +44,7 @@ struct kfd_smi_client {
>   	bool suser;
>   };
>   
> -#define MAX_KFIFO_SIZE	1024
> +#define KFD_MAX_KFIFO_SIZE	8192
>   
>   static __poll_t kfd_smi_ev_poll(struct file *, struct poll_table_struct *);
>   static ssize_t kfd_smi_ev_read(struct file *, char __user *, size_t, loff_t *);
> @@ -86,7 +86,7 @@ static ssize_t kfd_smi_ev_read(struct file *filep, char __user *user,
>   	struct kfd_smi_client *client = filep->private_data;
>   	unsigned char *buf;
>   
> -	size = min_t(size_t, size, MAX_KFIFO_SIZE);
> +	size = min_t(size_t, size, KFD_MAX_KFIFO_SIZE);
>   	buf = kmalloc(size, GFP_KERNEL);
>   	if (!buf)
>   		return -ENOMEM;
> @@ -355,7 +355,7 @@ int kfd_smi_event_open(struct kfd_node *dev, uint32_t *fd)
>   		return -ENOMEM;
>   	INIT_LIST_HEAD(&client->list);
>   
> -	ret = kfifo_alloc(&client->fifo, MAX_KFIFO_SIZE, GFP_KERNEL);
> +	ret = kfifo_alloc(&client->fifo, KFD_MAX_KFIFO_SIZE, GFP_KERNEL);
>   	if (ret) {
>   		kfree(client);
>   		return ret;

  reply	other threads:[~2024-08-22 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 20:15 [PATCH v2 0/4] Improve SVM migrate event report Philip Yang
2024-07-30 20:15 ` [PATCH v2 1/4] drm/amdkfd: Document and define SVM events message macro Philip Yang
2024-08-22 14:32   ` James Zhu
2024-08-22 14:58     ` Philip Yang
2024-07-30 20:15 ` [PATCH v2 2/4] drm/amdkfd: Output migrate end event if migrate failed Philip Yang
2024-07-30 20:15 ` [PATCH v2 3/4] drm/amdkfd: Increase SMI event fifo size Philip Yang
2024-08-22 14:34   ` James Zhu [this message]
2024-08-22 15:06     ` Philip Yang
2024-07-30 20:15 ` [PATCH v2 4/4] drm/amdkfd: SMI report dropped event count Philip Yang
2024-08-22 14:45   ` James Zhu

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=478425e7-ce6b-4573-9119-c40b555bd6df@amd.com \
    --to=jamesz@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Philip.Yang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox