[libvirt] [PATCH 0/5] Introduce NVDIMM support
guangrong.xiao at linux.intel.com
Fri Aug 12 05:48:22 UTC 2016
On 08/11/2016 04:12 PM, Michal Privoznik wrote:
> On 04.08.2016 10:42, Stefan Hajnoczi wrote:
>> On Mon, Aug 1, 2016 at 4:10 PM, Michal Privoznik <mprivozn at redhat.com> wrote:
>>> NVDIMM was introduced to qemu in v2.6.0-rc0~248^2~25. So it's
>>> been a while since then.
>>> It's not the next big thing, but it is very interesting feature
>>> enabling higher performance as reading/writing to the module (and
>>> subsequently to the file on the host) does not require a VMEXIT.
>>> It can be used to access host files directly bypassing page cache
>>> whilst doing so.
>>> How to test the feature?
>>> 1) you need PMEM enabled kernel:
>>> 2) Create a file in the host:
>>> truncate -s 512M /tmp/nvdimm
>>> 3) Add the following to the domain XML:
>>> <memory model='nvdimm' memAccess='shared'>
>>> <size unit='KiB'>523264</size>
>> The "nvdimm" device also has a label-size property. This determines
>> the size of the Namespace Label area described in:
>> By default no Namespace Label area is reserved in the file. If the
>> user specifies label-size then the memory at the end of the file is
>> used as the Namespace Label area.
>> It is necessary to expose label-size so users can choose whether or
>> not to have a Namespace Label area.
>> I have CCed Guangrong Xiao who authored the QEMU patches.
> Ah, thank you for that. From the code I understand that the minimum
> value for that is 128K, but what about other restrictions? Does the
> number need to be aligned? What is the minimal step between two
> different values?
The are only two restrictions:
1) the minimum label size is 128K as you pointed out.
2) the remaining size (total-size - label-size, which is used for PMEM) alined with
4k for normal backend or hugepage-size for hugetlbfs can not be 0.
More information about the libvir-list