Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: Walker, Benjamin <benjamin.walker at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] Hugepages deallocation
Date: Tue, 28 May 2019 17:08:05 +0000	[thread overview]
Message-ID: <f970f4ecbd5472baa554e0542b55b14200312bdb.camel@intel.com> (raw)
In-Reply-To: HE1PR0502MB30340449167AEABA7EA24488DB1C0@HE1PR0502MB3034.eurprd05.prod.outlook.com

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

On Sun, 2019-05-26 at 15:23 +0000, Gal Shalom wrote:
> Hello,
> 
> I encounter a initialization failure of SPDK v18.04, which I suspect the
> reason is the process of hugepages deallocation in SPDK.
> During my initialization I try to allocate a buffer of 1GB.
> The SPDK is able to initialized on the first few tries after a fresh reboot,
> but after I have killed it and started it over several times - it is unable to
> allocate the 1GB buffer. I suspect the SPDK isn't properly release the
> hugepages and they remain fragmented which is the reason for the failure of
> the allocation.
> 
> I am using spdk_dma_zmalloc for the buffer allocation and hugepages of 512MB,
> and would like any thoughts or suggestions about the error I get.

One suggestion I can come up with would be to debug this a bit by making a few
DPDK calls after initialization to walk through the allocated hugepages ("memory
segments") and test whether they are physically contiguous enough to perform a
1GB allocation. DPDK has facilities for walking through the memory map - with
the version shipped in SPDK v18.04, I think the code would look like this:

	struct rte_mem_config *mcfg;
	size_t seg_idx;

	mcfg = rte_eal_get_configuration()->mem_config;
	for (seg_idx = 0; seg_idx < RTE_MAX_MEMSEG; seg_idx++) {
		struct rte_memseg *seg = &mcfg->memseg[seg_idx];

		if (seg->addr == NULL) {
			break;
		}

		seg->phys_addr; // Physical address of memory segment here.
		seg->len; // Length of this segment
	}

Alternatively, the memory allocator has been rewritten in a more recent DPDK.
You could try upgrading to SPDK 19.04 (which uses DPDK 19.02) and see if the
problem persists.

> 
> Thanks,
> Gal
> 
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk


             reply	other threads:[~2019-05-28 17:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 17:08 Walker, Benjamin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-26 15:23 [SPDK] Hugepages deallocation Gal Shalom

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=f970f4ecbd5472baa554e0542b55b14200312bdb.camel@intel.com \
    --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