From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: vhost-user technical isssues Date: Mon, 17 Nov 2014 15:14:01 +0900 Message-ID: <54699229.8010603@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> <54658853.2090100@huawei.com> <54658F55.4070409@igel.co.jp> <54659361.6000702@huawei.com> <5465A7C2.7080208@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "dev-VfR2kkLFssw@public.gmane.org" To: "Xie, Huawei" Return-path: In-Reply-To: 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" Hi Xie, (2014/11/14 19:59), Xie, Huawei wrote: > I tested with latest qemu(with offset fix) in vhost app(not with test c= ase), unmap succeeds only when the size is aligned to 1GB(hugepage size).= I appreciate for your testing. > Another important thing is could we do mmap(0, region[i].memory_size, = PROT_XX, mmap_offset) rather than with offset 0? With the region above 4G= B, we will waste 4GB address space. Or we at least need to round down off= set to nearest 1GB, and round up memory size to upper 1GB, to save some a= ddress space waste. > > Anyway, this is ugly. Kernel doesn't take care of us, do those alignmen= t for us automatically. > It seems 'offset' also should be aligned by hugepage size also. But it might be a specification of mmap. Manpage of mmap says 'offset' should be aligned by sysconf(_SC_PAGE_SIZE). If the target file is on hugetlbfs, I guess hugepage size is used as alignment size. Thanks, Tetsuya