From nobody Fri May 17 03:54:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1596415591; cv=none; d=zohomail.com; s=zohoarc; b=cOspao2ArlnaygUEnbQY/qRKitwNs8WQgG1cjn4c1u93lS7r374Yd8I1WL6SqWx+2K7YK8D2dquqKrMEkPZXQpn/aPP2ElBWbEzFRGaYBofNbNSBQzu6oi7YMxBVckw5CW3xIrccatdhOMUtaVE7ujJo/mR9IcYCi+c4RJ0Hvq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596415591; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=WdfWq32CuTaC2vNDWvtiNu6oF86+sGV4CLuIqPA0JSE=; b=gP7nOXQ9Mx3d1OpyjvpGSCGCgWtSv7jlKmYMMvHYH/gL9JuW/Xwg9pAzbGZw5QVnrC/lm8mEYiLwi3xj0xWp1C5ZmcYohBqy2ZiItAL8Mpip3LhTSI6ki0l8k4QB0CZkzeAJTPMlN62khvJPd8Lzxc/N3S4YoPTGdJL+ktsV274= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1596415591573161.56475142209024; Sun, 2 Aug 2020 17:46:31 -0700 (PDT) Received: from localhost ([::1]:47312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2OcX-0006gq-8b for importer@patchew.org; Sun, 02 Aug 2020 20:46:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Oby-0006G6-PJ for qemu-devel@nongnu.org; Sun, 02 Aug 2020 20:45:54 -0400 Received: from mga11.intel.com ([192.55.52.93]:15390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Obw-00041b-71 for qemu-devel@nongnu.org; Sun, 02 Aug 2020 20:45:54 -0400 Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2020 17:45:45 -0700 Received: from dazhang1-mobile.sh.intel.com ([10.239.48.70]) by fmsmga007.fm.intel.com with ESMTP; 02 Aug 2020 17:45:43 -0700 IronPort-SDR: /gmwIgVSV7v4mbxF42H+0uhxIAqaJGVkLjpbvSSmWKTmtL9P4/8roIZYRnSDRq+8Ya1ANyjB6/ lPJE7BfLQyhw== X-IronPort-AV: E=McAfee;i="6000,8403,9701"; a="149832162" X-IronPort-AV: E=Sophos;i="5.75,428,1589266800"; d="scan'208";a="149832162" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: 5SZlPvyqIg5XmlzmqmIzRUJwpslYd9NEvlmpEQnaFVc36RVrS61PsKQvup44XV6a3Z2Cu3dgrw gz2hTA6KbB+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,428,1589266800"; d="scan'208";a="273778277" From: Jingqi Liu To: Stefan Hajnoczi , Pankaj Gupta , Paolo Bonzini , Xiao Guangrong , Dan Williams Subject: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file Date: Mon, 3 Aug 2020 08:35:18 +0800 Message-Id: <20200803003518.88891-1-jingqi.liu@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.93; envelope-from=jingqi.liu@intel.com; helo=mga11.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/02 20:45:45 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jingqi Liu , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "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 msyn= c(). The following warning is output. "warning: qemu_ram_msync: failed to sync memory range=E2=80=9C So we add 'pmem=3Don' to avoid calling msync(), use the QEMU command line: -object memory-backend-file,id=3Dmem1,pmem=3Don,mem-path=3D/dev/dax0.0,= size=3D4G Reviewed-by: Stefan Hajnoczi Reviewed-by: Pankaj Gupta Signed-off-by: Jingqi Liu --- 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: =20 -object memory-backend-file,id=3Dnv_mem,mem-path=3D/XXX/yyy,size=3D4G,= pmem=3Don =20 +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=3Don' to avoid calling msync(), use the QEMU command line: + + -object memory-backend-file,id=3Dmem1,pmem=3Don,mem-path=3D/dev/dax0.0= ,size=3D4G + References ---------- =20 --=20 2.17.1