All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file
@ 2020-07-15  2:54 Jingqi Liu
  2020-07-24  7:15 ` Liu, Jingqi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jingqi Liu @ 2020-07-15  2:54 UTC (permalink / raw)
  To: Paolo Bonzini, Xiao Guangrong, Dan Williams; +Cc: Jingqi Liu, qemu-devel

At the end of live migration, QEMU uses msync() to flush the data to
the backend storage. When the backend file is a character device dax,
the pages explicitly avoid the page cache. It will return failure from msync().
The following warning is output.

    "warning: qemu_ram_msync: failed to sync memory range“

So we add 'pmem=on' to avoid calling msync(), use the QEMU command line:

    -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G

Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
---
 docs/nvdimm.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
index c2c6e441b3..31048aff5e 100644
--- a/docs/nvdimm.txt
+++ b/docs/nvdimm.txt
@@ -243,6 +243,13 @@ use the QEMU command line:
 
     -object memory-backend-file,id=nv_mem,mem-path=/XXX/yyy,size=4G,pmem=on
 
+At the end of live migration, QEMU uses msync() to flush the data to the
+backend storage. When the backend file is a character device dax, the pages
+explicitly avoid the page cache. It will return failure from msync().
+So we add 'pmem=on' to avoid calling msync(), use the QEMU command line:
+
+    -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G
+
 References
 ----------
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file
@ 2020-07-30  1:02 Jingqi Liu
  2020-07-30  5:07 ` Pankaj Gupta
  0 siblings, 1 reply; 7+ messages in thread
From: Jingqi Liu @ 2020-07-30  1:02 UTC (permalink / raw)
  To: Stefan Hajnoczi, Paolo Bonzini, Xiao Guangrong, Dan Williams
  Cc: Jingqi Liu, qemu-devel

At the end of live migration, QEMU uses msync() to flush the data to
the backend storage. When the backend file is a character device dax,
the pages explicitly avoid the page cache. It will return failure from msync().
The following warning is output.

    "warning: qemu_ram_msync: failed to sync memory range“

So we add 'pmem=on' to avoid calling msync(), use the QEMU command line:

    -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
---
 docs/nvdimm.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
index c2c6e441b3..31048aff5e 100644
--- a/docs/nvdimm.txt
+++ b/docs/nvdimm.txt
@@ -243,6 +243,13 @@ use the QEMU command line:
 
     -object memory-backend-file,id=nv_mem,mem-path=/XXX/yyy,size=4G,pmem=on
 
+At the end of live migration, QEMU uses msync() to flush the data to the
+backend storage. When the backend file is a character device dax, the pages
+explicitly avoid the page cache. It will return failure from msync().
+So we add 'pmem=on' to avoid calling msync(), use the QEMU command line:
+
+    -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G
+
 References
 ----------
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file
@ 2020-08-03  0:35 Jingqi Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Jingqi Liu @ 2020-08-03  0:35 UTC (permalink / raw)
  To: Stefan Hajnoczi, Pankaj Gupta, Paolo Bonzini, Xiao Guangrong,
	Dan Williams
  Cc: Jingqi Liu, qemu-devel

At the end of live migration, QEMU uses msync() to flush the data to
the backend storage. When the backend file is a character device dax,
the pages explicitly avoid the page cache. It will return failure from msync().
The following warning is output.

    "warning: qemu_ram_msync: failed to sync memory range“

So we add 'pmem=on' to avoid calling msync(), use the QEMU command line:

    -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
---
 docs/nvdimm.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
index c2c6e441b3..31048aff5e 100644
--- a/docs/nvdimm.txt
+++ b/docs/nvdimm.txt
@@ -243,6 +243,13 @@ use the QEMU command line:
 
     -object memory-backend-file,id=nv_mem,mem-path=/XXX/yyy,size=4G,pmem=on
 
+At the end of live migration, QEMU uses msync() to flush the data to the
+backend storage. When the backend file is a character device dax, the pages
+explicitly avoid the page cache. It will return failure from msync().
+So we add 'pmem=on' to avoid calling msync(), use the QEMU command line:
+
+    -object memory-backend-file,id=mem1,pmem=on,mem-path=/dev/dax0.0,size=4G
+
 References
 ----------
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-03  0:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  2:54 [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file Jingqi Liu
2020-07-24  7:15 ` Liu, Jingqi
2020-07-28  1:09 ` Liu, Jingqi
2020-07-29 10:42 ` Stefan Hajnoczi
2020-07-30  1:02 Jingqi Liu
2020-07-30  5:07 ` Pankaj Gupta
2020-08-03  0:35 Jingqi Liu

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.