<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 2024-08-22 10:34, James Zhu wrote:<br>
</div>
<blockquote type="cite" cite="mid:478425e7-ce6b-4573-9119-c40b555bd6df@amd.com">
<br>
On 2024-07-30 16:15, Philip Yang wrote:
<br>
<blockquote type="cite">SMI event fifo size 1KB was enough to
report GPU vm fault or reset
<br>
</blockquote>
[JZ] There is a typo here. it should be NOT enough.
<br>
</blockquote>
<p>It is not typo, but it is not clear, will change to</p>
<p>SMI event fifo size 1KB is enough to report GPU vm fault or reset
event, but could drop the more frequent SVM migration events,</p>
<p>Regards,</p>
<p>Philip<br>
</p>
<blockquote type="cite" cite="mid:478425e7-ce6b-4573-9119-c40b555bd6df@amd.com">
<blockquote type="cite">event, increase it to 8KB to store about
100 migrate events, less chance
<br>
to drop the migrate events if lots of migration happened in the
short
<br>
period of time. Add KFD prefix to the macro name.
<br>
<br>
Signed-off-by: Philip Yang <a class="moz-txt-link-rfc2396E" href="mailto:Philip.Yang@amd.com"><Philip.Yang@amd.com></a>
<br>
---
<br>
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 6 +++---
<br>
1 file changed, 3 insertions(+), 3 deletions(-)
<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
<br>
index 1d94b445a060..9b8169761ec5 100644
<br>
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
<br>
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
<br>
@@ -44,7 +44,7 @@ struct kfd_smi_client {
<br>
bool suser;
<br>
};
<br>
-#define MAX_KFIFO_SIZE 1024
<br>
+#define KFD_MAX_KFIFO_SIZE 8192
<br>
static __poll_t kfd_smi_ev_poll(struct file *, struct
poll_table_struct *);
<br>
static ssize_t kfd_smi_ev_read(struct file *, char __user *,
size_t, loff_t *);
<br>
@@ -86,7 +86,7 @@ static ssize_t kfd_smi_ev_read(struct file
*filep, char __user *user,
<br>
struct kfd_smi_client *client = filep->private_data;
<br>
unsigned char *buf;
<br>
- size = min_t(size_t, size, MAX_KFIFO_SIZE);
<br>
+ size = min_t(size_t, size, KFD_MAX_KFIFO_SIZE);
<br>
buf = kmalloc(size, GFP_KERNEL);
<br>
if (!buf)
<br>
return -ENOMEM;
<br>
@@ -355,7 +355,7 @@ int kfd_smi_event_open(struct kfd_node *dev,
uint32_t *fd)
<br>
return -ENOMEM;
<br>
INIT_LIST_HEAD(&client->list);
<br>
- ret = kfifo_alloc(&client->fifo, MAX_KFIFO_SIZE,
GFP_KERNEL);
<br>
+ ret = kfifo_alloc(&client->fifo, KFD_MAX_KFIFO_SIZE,
GFP_KERNEL);
<br>
if (ret) {
<br>
kfree(client);
<br>
return ret;
<br>
</blockquote>
</blockquote>
</body>
</html>