mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 07:02:29 -04:00
drm/amdkfd: Increase SMI event fifo size
SMI event fifo size 1KB was enough to report GPU vm fault or reset event, but could drop the more frequent SVM migration events. Increase kfifo size 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> Reviewed-by: James Zhu <James.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
1845752b2f
commit
623f1dd63b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user