Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: cfrancisy at gmail.com
To: spdk@lists.01.org
Subject: [SPDK] spdk_zmalloc error
Date: Tue, 14 Apr 2020 08:03:56 +0000	[thread overview]
Message-ID: <20200414080356.2799.37367@ml01.vlan13.01.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

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_ = (char*)spdk_zmalloc(SPDK_BUFFER_SIZE, 
                                      SPDK_PAGE_SIZE, NULL, 
                                      SPDK_ENV_SOCKET_ID_ANY,
                                      SPDK_MALLOC_DMA);
if(buffer_ == nullptr){
fprintf(stderr, "%s:%d: SPDK allocate memory failed\n", __FILE__, __LINE__);
}
---------------------------------------

I found that in some buffer allocations, the variable buffer_ after the spdk_zmalloc is still a nullptr. 
It makes the program throw error output.
I start up spdk enviroment with hugemem=16384, the total memory pool size 8GB.
SPDK vesion is v20.01


Could someone give me some comments? thanks.

                 reply	other threads:[~2020-04-14  8:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200414080356.2799.37367@ml01.vlan13.01.org \
    --to=spdk@lists.01.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