Re: [PATCH v5 02/11] nvdimm: introduce 'pmem' element into xml for NVDIMM memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$SUBJ:

conf: Introduce

On 12/20/18 4:14 AM, Luyao Zhong wrote:
> The 'pmem' option allows users to specify whether the backend
> storage of memory-backend-file is a real persistent memory:
> 
> <devices>
>   ...
>   <memory model='nvdimm' access='shared'>
>       <source>
>           <path>/dev/dax0.0</path>
>           <pmem/>
>       </source>
>       <target>
>           <size unit='MiB'>4094</size>
>           <node>0</node>
>           <label>
>               <size unit='MiB'>2</size>
>           </label>
>       </target>
>   </memory>
>   ...
> </devices>
> 
> Signed-off-by: Luyao Zhong <luyao.zhong@xxxxxxxxx>
> ---
>  docs/formatdomain.html.in                          | 12 +++++
>  docs/schemas/domaincommon.rng                      |  5 ++
>  src/conf/domain_conf.c                             | 13 +++++
>  src/conf/domain_conf.h                             |  1 +
>  .../memory-hotplug-nvdimm-pmem.xml                 | 58 ++++++++++++++++++++++
>  .../memory-hotplug-nvdimm-pmem.xml                 |  1 +
>  tests/qemuxml2xmltest.c                            |  1 +
>  7 files changed, 91 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
>  create mode 120000 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-pmem.xml
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 515e656..0781f24 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -8323,6 +8323,7 @@ qemu-kvm -net nic,model=? /dev/null
>      &lt;source&gt;
>        &lt;path&gt;/tmp/nvdimm&lt;/path&gt;
>        &lt;alignsize unit='KiB'&gt;2048&lt;/alignsize&gt;
> +      &lt;pmem/&gt;

Should a whole new entry be created, e.g. rather than modifying the
above use:

  &lt;memory model='nvdimm'&gt;
    &lt;source&gt;
      &lt;path&gt;/dev/dax0.0&lt;/path&gt;
      &lt;pmem/&gt;
    &lt;/source&gt;
    &lt;target&gt;
      &lt;size unit='KiB'&gt;524288&lt;/size&gt;
      &lt;node&gt;1&lt;/node&gt;
      &lt;label&gt;
        &lt;size unit='KiB'&gt;128&lt;/size&gt;
      &lt;/label&gt;
    &lt;/target&gt;
  &lt;/memory&gt;

?

Whether the <target> values make sense or not is something you can clarify.

>      &lt;/source&gt;
>      &lt;target&gt;
>        &lt;size unit='KiB'&gt;524288&lt;/size&gt;
> @@ -8423,6 +8424,17 @@ qemu-kvm -net nic,model=? /dev/null
>                <span class="since">Since 5.0.0</span>
>              </p>
>            </dd>
> +
> +          <dt><code>pmem</code></dt>
> +          <dd>
> +            <p>
> +              This element can be used to specify whether the backend storage
> +              of memory-backend-file is a real persistent memory. If the
> +              backend is a real persistence memory and <code>pmem</code> is set,
> +              QEMU will guarantee the persistence of its own writes to the
> +              vNVDIMM backend. <span class="since">Since 5.0.0</span>

Not sure exactly how to rewrite the above to be more hypervisor
agnostic, but how's this?:

If persistent memory is supported and enabled by the hypervisor in order
to guarantee the persistence of writes to the vNVDIMM backend, then use
the <code>pmem</code> element in order to utilize the feature.

I can make the changes with your OK.

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

[...]

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux