From: Jingqi Liu <jingqi.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: Jingqi Liu <jingqi.liu@intel.com>, qemu-devel@nongnu.org
Subject: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file
Date: Wed, 15 Jul 2020 10:54:29 +0800 [thread overview]
Message-ID: <20200715025429.28657-1-jingqi.liu@intel.com> (raw)
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
next reply other threads:[~2020-07-15 3:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 2:54 Jingqi Liu [this message]
2020-07-24 7:15 ` [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file Liu, Jingqi
2020-07-28 1:09 ` Liu, Jingqi
2020-07-29 10:42 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2020-07-30 1:02 Jingqi Liu
2020-07-30 5:07 ` Pankaj Gupta
2020-08-03 0:35 Jingqi Liu
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=20200715025429.28657-1-jingqi.liu@intel.com \
--to=jingqi.liu@intel.com \
--cc=dan.j.williams@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoguangrong.eric@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).