From nobody Fri Apr 26 20:55:04 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=1596071587; cv=none; d=zohomail.com; s=zohoarc; b=M23CGzQTwL7OE5wg0yBlD5DO13RnFPVrsCGVVsJps+AZAs1aJuadHcwwpX9/r1o+ETRg+h6ysszqLWN7Ft5Ffq/5IR2rYZecjb5UeLCKlN2mE37KV/gvGapqxRwrxwwkOIy8kNkhtJhYdmMTZsQxOyDBsZ8RH5T+pYD+eP/29oQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596071587; 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=wbvR+xXe/4ngCVo/oCxpwhGCexKYGumHe+gwhuUmmhI=; b=VM2lHfv+bas/vydA+OH925cniu9eDEQRcGvxgqP+1sp04Cq8qZpSQHFBXhUDPRv1WYy4g3+elT1gl11J6JMxhV0zxENsuIMN9YzzPIXeRNEM4f1PgkKgCSHFPZn69rdSA8BxYD2SjM/xVuByZf06fRcEFkHHBpAzUVQICyWssaQ= 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 1596071587095466.91878974995575; Wed, 29 Jul 2020 18:13:07 -0700 (PDT) Received: from localhost ([::1]:40956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0x84-0005Eg-Uq for importer@patchew.org; Wed, 29 Jul 2020 21:13:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0x7U-0004pB-Dk for qemu-devel@nongnu.org; Wed, 29 Jul 2020 21:12:28 -0400 Received: from mga18.intel.com ([134.134.136.126]:15476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0x7R-0007vL-Lh for qemu-devel@nongnu.org; Wed, 29 Jul 2020 21:12:27 -0400 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 18:12:20 -0700 Received: from dazhang1-mobile.sh.intel.com ([10.239.48.70]) by fmsmga004.fm.intel.com with ESMTP; 29 Jul 2020 18:12:18 -0700 IronPort-SDR: Xn41st3Lb3tBigGy5iv+cqK0yC16w6ycD8EU9Or5V0RhlYjNNZCABjLvM52UxPQG2TOachgdEV R7b4uuR7ZuKw== X-IronPort-AV: E=McAfee;i="6000,8403,9697"; a="139055715" X-IronPort-AV: E=Sophos;i="5.75,412,1589266800"; d="scan'208";a="139055715" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: 51dGuBhdgg+xbxDmYkcmeWFTyEoO6TkqCGO2jXDPrTbnnq9wOovf9d4772n3GCKrH/tQZmRmro 6u7pgaNEwegw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,412,1589266800"; d="scan'208";a="313233873" From: Jingqi Liu To: Stefan Hajnoczi , Paolo Bonzini , Xiao Guangrong , Dan Williams Subject: [PATCH] docs/nvdimm: add 'pmem=on' for the device dax backend file Date: Thu, 30 Jul 2020 09:02:06 +0800 Message-Id: <20200730010206.47051-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=134.134.136.126; envelope-from=jingqi.liu@intel.com; helo=mga18.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/29 21:12:20 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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 Signed-off-by: Jingqi Liu Reviewed-by: Pankaj Gupta --- 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