nvme: increase size of uevent buffer to 1MB
In production environments, there could be large numbers of uevents other than nvme hotplug events. We want to ensure we never lose an nvme uevent due to ENOBUFS (i.e. overflow). So allocate a bigger receive buffer for the netlink socket to ensure we never lose any events. We only allocate one netlink socket per SPDK application, so the extra memory consumption is not really a concern. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I663fbb093516a01a8980a1517245f92d8c76f7aa Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4070 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
ba773a54c7
commit
2431578990
@ -43,13 +43,14 @@
|
||||
#include <linux/netlink.h>
|
||||
|
||||
#define SPDK_UEVENT_MSG_LEN 4096
|
||||
#define SPDK_UEVENT_RECVBUF_SIZE 1024 * 1024
|
||||
|
||||
int
|
||||
nvme_uevent_connect(void)
|
||||
{
|
||||
struct sockaddr_nl addr;
|
||||
int netlink_fd;
|
||||
int size = 64 * 1024;
|
||||
int size = SPDK_UEVENT_RECVBUF_SIZE;
|
||||
int flag;
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
|
Loading…
Reference in New Issue
Block a user