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 335BF8E82 for ; Thu, 14 Jan 2016 12:41:36 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 14 Jan 2016 03:41:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,294,1449561600"; d="scan'208";a="890356931" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.239.200.52]) ([10.239.200.52]) by orsmga002.jf.intel.com with ESMTP; 14 Jan 2016 03:41:33 -0800 To: Amit Tomer References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-1-git-send-email-jianfeng.tan@intel.com> <058a01d14c7b$5cdc60d0$16952270$@samsung.com> <5693CFE4.4060405@intel.com> <009a01d14d0c$3ab6cd60$b0246820$@samsung.com> <00b101d14d14$bab82510$30286f30$@samsung.com> <5694BE75.7010708@intel.com> <00d901d14d26$d04fc600$70ef5200$@samsung.com> <56951357.2030008@intel.com> <5695275A.5050203@intel.com> <56969A3F.1040503@intel.com> From: "Tan, Jianfeng" Message-ID: <5697896C.2000804@intel.com> Date: Thu, 14 Jan 2016 19:41:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: nakajima.yoshihiro@lab.ntt.co.jp, "Michael S. Tsirkin" , dev@dpdk.org, ann.zhuangyanying@huawei.com Subject: Re: [dpdk-dev] [PATCH 0/4] virtio support for container 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: Thu, 14 Jan 2016 11:41:36 -0000 Hi Amit, On 1/14/2016 5:34 PM, Amit Tomer wrote: > Hello, > >> Can you send out how you start this l2fwd program? > This is how, I run l2fwd program. > > CMD ["/usr/src/dpdk/examples/l2fwd/build/l2fwd", "-c", "0x3", "-n", > "4","--no-pci", > ,"--no-huge","--vdev=eth_cvio0,queue_num=256,rx=1,tx=1,cq=0,path=/usr/src/dpdk/usvhost", > "--", "-p", "0x1"] In this way, you can only get 64M memory. I believe it's too small to create a l2fwd_pktmbuf_pool in l2fwd. > I tried passing "-m 1024" to it but It causes l2fwd killed even before > it could connect to usvhost socket. In my patch, when --no-huge is specified, I change previous anonymous mmap into file-baked memory in /dev/shm. And usually, Docker mounts a 64MB-size tmpfs there, so you cannot use -m 1024. If you want to do that, use -v to substitute the 64MB tmpfs with a bigger tmpfs. > > Do I need to create Hugepages from Inside Docker container to make use > of Hugepages? Not necessary. But if you want to use hugepages inside Docker, use -v option to map a hugetlbfs into containers. Most importantly, you indeed uncover a bug here. Current implementation cannot work with tmpfs, because it lacks ftruncate() between open() and mmap(). It turns out that although mmap() succeeds, the memory cannot be touched. However, this is not a problem for hugetlbfs. I don't why they differ like that way. In all, if you want to use no-huge, please add ftruncate(), I'll fix this in next version. Thanks, Jianfeng > > Thanks, > Amit.