From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 48D802956 for ; Sun, 10 Apr 2016 21:44:18 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id n3so79645319wmn.0 for ; Sun, 10 Apr 2016 12:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=+i1ZFj5qXtMgAO795hQu2Vdzb3HNm8i5bpKsFDkTGHo=; b=qf/I+tpLLI8C4v/DsDVdqzYtnT6idPuPVhyHZR3ay8rz1uq24I3+4DuuO82M7czw/3 qEFGZa5MhXvLBPzTI+NXJ+tPw12fSrcZtbRUgXTJ7mtJUjZLFZcoqjIHJs2JbCPClVAl fZV8BNs7fsScuMBcd25DK25QraH33EE4mLvRT9qzhmeFsjgrEiTm3KzqpH86yaVOgcEM 8wNnoQhx6n7j9SJ8wCXnGcE/ZL6EKhO7K4ggqyzMMxccq7/GveihAatfa1B8reH24x02 QsYqkTLUCvruzfiDbu7uqWkPyv/YXIOfbC4XUs+bsSPoJbqrfKqGLAENmzlqlGdY9FSM DXZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=+i1ZFj5qXtMgAO795hQu2Vdzb3HNm8i5bpKsFDkTGHo=; b=XRIkR3TNWbLTj6VIpYaaXx9mfxHLh98RJuZOpOaoVfYGoqFpLtnQ231VKPMJQAX6QL H1b4riYC+nJcz8/7qFvslniMWFW3PhPxZYw32e6WyHroF67RUlIkOVBr8fN3cu72sUpY dZEmSE98m2xMSDnL5oCxw3wIIRrQ1x3BQSnd1yK+nqLOq7a/ldNm+ViNwlDzjbmk/buR ChMzyYsjtHjDkK+8nsjX4wVV06AyB8Nr3wLQSZI1CDw+Y0jPTTSkc5zFROj3FUVky7mn aoBkPhv8SOKSZFrZFUNaZ5iKVZ7Y7QpTFnqNR0NF5oaIJsRDWyIvP+vuOpGt/0ZusgL9 DRvQ== X-Gm-Message-State: AD7BkJIBmVR5B56P0K/ZUg5dyaZQA0TmazFS2eOvr9HpRgWm75Jo7gDtEPXxOUcDsyqiePxV X-Received: by 10.28.184.194 with SMTP id i185mr14785078wmf.90.1460317458123; Sun, 10 Apr 2016 12:44:18 -0700 (PDT) Received: from xps13.localnet (245.111.75.86.rev.sfr.net. [86.75.111.245]) by smtp.gmail.com with ESMTPSA id xx3sm24161819wjc.32.2016.04.10.12.44.17 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 10 Apr 2016 12:44:17 -0700 (PDT) From: Thomas Monjalon To: Zhe Tao Cc: dev@dpdk.org Date: Sun, 10 Apr 2016 21:44:16 +0200 Message-ID: <2695247.7xaK7GTsXK@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1460309332-21981-1-git-send-email-zhe.tao@intel.com> References: <1460309332-21981-1-git-send-email-zhe.tao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] vhost: fix mem share between VM and host 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: Sun, 10 Apr 2016 19:44:18 -0000 2016-04-11 01:28, Zhe Tao: > The reason cause this problem is that in QEMU, when assign the > memory-backend-file without share option, will cause QEMU mmap the mem file > without using the MAP_SHARED flag, so the page cache for that file will not > shared between other processes, all the upated to the mapping area in the VM > will not carry through to the vhost-user process. > > According to kernel implementation, data for the new hugetlbfs file will be > all zero, so check the first RX virtqueue descriptor next field to see > whether the mem is shared or not, if the mem is shared, the next field should > not equal to zero, otherwise this mem is not shared between VM and host. I failed to understand. Please try to do some short sentences and start by explaining what is the bug you see. Then you can start explain the root cause and how it can be fixed (using some short sentences). I also think it is too late to integrate such code change in 16.04 (even if I don't understand how important it is).