From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: vhost-user technical isssues Date: Fri, 14 Nov 2014 13:05:06 +0900 Message-ID: <54657F72.6040708@igel.co.jp> References: <5462DE39.1070006@igel.co.jp> <54645007.3010301@huawei.com> <54656950.1050204@igel.co.jp> <54657365.7090504@huawei.com> <546579A3.3010804@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Linhaifeng , "Xie, Huawei" Return-path: In-Reply-To: <546579A3.3010804-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" (2014/11/14 12:40), Tetsuya Mukawa wrote: > I am using 1GB hugepage size. > > $ sudo QTEST_HUGETLBFS_PATH=/mnt/huge make check > region=0, mmap=0x2aaac0000000, size=6291456000 > region=0, munmap=0x2aaac0000000, size=6291456000, ret=-1 << failed > > 6291456000 is not aligned by 1GB. > When I specify 4096MB as guest memory size, munmap() doesn't return > error like following. > > $ sudo QTEST_HUGETLBFS_PATH=/mnt/huge make check > region=0, mmap=0x2aaac0000000, size=4294967296 > region=0, munmap=0x2aaac0000000, size=4294967296, ret=0 > > Also I've checked mmap2 and munmap implementation of current linux kernel. When a file on hugetlbfs is mapped, 'size' will be aligned by hugepages size in some case. But when munmap is called, 'size' will be aligned by PAGE_SIZE. It mean we cannot use same 'size' value for mmap and munmap in some case. I guess this implementation or specification cases the munmap issue. Thanks, Tetsuya