From: Ernest Zaslavsky <kreuzerkrieg at gmail.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] Memory buffer allocation in SPDK
Date: Wed, 07 Feb 2018 07:51:02 +0200 [thread overview]
Message-ID: <5a7a93c8.d4f4500a.21cf3.30c4@mx.google.com> (raw)
In-Reply-To: 8F16ED7A-281B-4658-AB6E-016F6C4D5A30@intel.com
[-- Attachment #1: Type: text/plain, Size: 1891 bytes --]
Hi James,
Thanks for the info, sounds like we have a way to solve our problem. I have some additional questions. The spdk_mem_register() function, it just adds the region to the SPDK allocation map, right? It does not touch or modifies the memory in any way, right? Is it safe to say that we may register with SPDK all our pre-allocated memory when the application starts and just keep it that way?
Sincerely,
E.
From: Harris, James R
Sent: Wednesday, February 7, 2018 2:11 AM
To: Storage Performance Development Kit
Subject: Re: [SPDK] Memory buffer allocation in SPDK
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Ernest Zaslavsky <kreuzerkrieg(a)gmail.com>
Reply-To: Storage Performance Development Kit <spdk(a)lists.01.org>
Date: Tuesday, February 6, 2018 at 6:32 AM
To: "spdk(a)lists.01.org" <spdk(a)lists.01.org>
Subject: [SPDK] Memory buffer allocation in SPDK
Hi,
I’ve found this discussion https://lists.01.org/pipermail/spdk/2016-December/000251.html on memory allocation. I have similar situation – our application uses some allocator to create IO buffers, but of course, SPDK would not accept such a buffer. So I have two questions:
1) I cant find in code the spdk_vtophys_register() mentioned in the above link, is it removed? If not, where is it? How to use it?
Hi Ernest,
spdk_mem_register() is the equivalent function now. This will register the specified buffer not only for virtual-to-physical address translation, but also for RDMA operations using the SPDK NVMe-oF driver.
2) In case our allocator uses hugepages and it is aligned on 4Kib boundary, is there a way to make the SPDK believe that this buffer could be used for NVMe IO?
spdk_mem_register() is the function to use. Note that currently for vtophys translation, the specified buffer must be 2MiB aligned and an even 2MiB multiple.
Regards,
-Jim
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 6716 bytes --]
next reply other threads:[~2018-02-07 5:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 5:51 Ernest Zaslavsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-07 15:01 [SPDK] Memory buffer allocation in SPDK Ernest Zaslavsky
2018-02-07 15:00 Harris, James R
2018-02-07 0:11 Harris, James R
2018-02-06 13:32 Ernest Zaslavsky
2016-12-13 16:05 [SPDK] Memory Buffer Allocation " Harris, James R
2016-12-13 15:49 yzhu
2016-12-13 4:46 Harris, James R
2016-12-13 4:13 yzhu
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=5a7a93c8.d4f4500a.21cf3.30c4@mx.google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.