From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5EB675A24 for ; Tue, 3 Mar 2015 02:51:10 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 02 Mar 2015 17:48:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,679,1418112000"; d="scan'208";a="659523108" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 02 Mar 2015 17:51:08 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t231p50Z015575; Tue, 3 Mar 2015 09:51:05 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t231p1xG011310; Tue, 3 Mar 2015 09:51:03 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t231p13T011306; Tue, 3 Mar 2015 09:51:01 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Tue, 3 Mar 2015 09:50:59 +0800 Message-Id: <1425347459-11042-1-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1425286674-17495-1-git-send-email-changchun.ouyang@intel.com> References: <1425286674-17495-1-git-send-email-changchun.ouyang@intel.com> Subject: [dpdk-dev] [PATCH v2] doc: Update doc for vhost sample X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 01:51:11 -0000 Add some contents for vhost sample. Signed-off-by: Changchun Ouyang --- Change in v2: -- Refine its format to fit well with other parts. doc/guides/sample_app_ug/vhost.rst | 52 +++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst index fa53db6..76997da 100644 --- a/doc/guides/sample_app_ug/vhost.rst +++ b/doc/guides/sample_app_ug/vhost.rst @@ -640,19 +640,57 @@ To call the QEMU wrapper automatically from libvirt, the following configuration Common Issues ~~~~~~~~~~~~~ -**QEMU failing to allocate memory on hugetlbfs.** +* QEMU failing to allocate memory on hugetlbfs: -file_ram_alloc: can't mmap RAM pages: Cannot allocate memory + file_ram_alloc: can't mmap RAM pages: Cannot allocate memory -When running QEMU the above error implies that it has failed to allocate memory for the Virtual Machine on the hugetlbfs. -This is typically due to insufficient hugepages being free to support the allocation request. -The number of free hugepages can be checked as follows: + When running QEMU the above error implies that it has failed to allocate memory for the Virtual Machine on + the hugetlbfs. This is typically due to insufficient hugepages being free to support the allocation request. + The number of free hugepages can be checked as follows: -.. code-block:: console + .. code-block:: console user@target:cat /sys/kernel/mm/hugepages/hugepages- / nr_hugepages -The command above indicates how many hugepages are free to support QEMU's allocation request. + The command above indicates how many hugepages are free to support QEMU's allocation request. + +* User space VHOST work properly with the guest with 2M sized hug pages: + + The guest may have 2M or 1G sized huge pages file, the user space VHOST can work properly in both cases. + +* User space VHOST will not work with QEMU without '-mem-prealloc' option: + + The current implementation work properly only when the guest memory is pre-allocated, so it is required to + use the correct QEMU version(e.g. 1.6) which supports '-mem-prealloc'; The option '-mem-prealloc' must be + specified explicitly in QEMU command line. + +* User space VHOST will not work with QEMU version without shared memory mapping: + + As shared memory mapping is mandatory for user space VHOST to work properly with the guest as user space VHOST + needs access the shared memory from the guest to receive and transmit packets. It is important to make sure + the QEMU version used supports shared memory mapping. + +* Using libvirt "virsh create" the qemu-wrap.py spawns a new process to run "qemu-kvm". This impacts the behavior + of the "virsh destroy" which kills the process running "qemu-wrap.py" without actually destroying the VM (leaves + the "qemu-kvm" process running): + + This following patch can fix this issue: + http://dpdk.org/ml/archives/dev/2014-June/003607.html + +* In Ubuntu environment, QEMU fail to start a new guest normally with user space VHOST due to hug pages can't be + allocated for the new guest.* + + The solution for this issue could be adding "-boot c" into QEMU command line to make sure the huge pages are + allocated properly and then the guest will startup normally. + + Use "cat /proc/meminfo" to check if there is any change in value of HugePages_Total and HugePages_Free after the + guest startup. + +* Logging message: "eventfd_link: module verification failed: signature and/or required key missing - tainting kernel"* + + Ignore the above logging message. The message occurs due to the new module eventfd_link, which is not a standard + module of Linux, but it is necessary for user space VHOST current implementation(CUSE-based) to communicate with + the guest. Running DPDK in the Virtual Machine ----------------------------------- -- 1.8.4.2