From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4604127430927974761==" MIME-Version: 1.0 From: cfrancisy at gmail.com Subject: [SPDK] spdk_zmalloc error Date: Tue, 14 Apr 2020 08:03:56 +0000 Message-ID: <20200414080356.2799.37367@ml01.vlan13.01.org> List-ID: To: spdk@lists.01.org --===============4604127430927974761== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, = I meet a weird problem. The error below only happens in one machine of my = cluster, but in other nodes, the program run successfully without bug. I try to build a memory pool, which consists of 256 buffers, each is 32M. Here is my code snippet. For a memory pool, it will execute many times. ---------------------------------------------- #define SPDK_PAGE_SIZE (4096) #define SPDK_BUFFER_SIZE (32ull<<20) buffer_ =3D (char*)spdk_zmalloc(SPDK_BUFFER_SIZE, = SPDK_PAGE_SIZE, NULL, = SPDK_ENV_SOCKET_ID_ANY, SPDK_MALLOC_DMA); if(buffer_ =3D=3D nullptr){ fprintf(stderr, "%s:%d: SPDK allocate memory failed\n", __FILE__, __LINE__); } --------------------------------------- I found that in some buffer allocations, the variable buffer_ after the spd= k_zmalloc is still a nullptr. = It makes the program throw error output. I start up spdk enviroment with hugemem=3D16384, the total memory pool size= 8GB. SPDK vesion is v20.01 Could someone give me some comments? thanks. --===============4604127430927974761==--