From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH 2/4] mem: add API to obstain memory-backed file info Date: Tue, 12 Jan 2016 18:48:09 +0800 Message-ID: <5694D9E9.6060704@intel.com> References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-3-git-send-email-jianfeng.tan@intel.com> <5694C36D.2040006@intel.com> <00d501d14d20$930c8ae0$b925a0a0$@samsung.com> Mime-Version: 1.0 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 To: Pavel Fedin , 'Rich Lane' Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 958AD591A for ; Tue, 12 Jan 2016 11:48:13 +0100 (CET) In-Reply-To: <00d501d14d20$930c8ae0$b925a0a0$@samsung.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello! > But in this case host gets this page size for total region size, therefore qva_to_vva() fails. > I haven't worked with hugepages, but i guess that with real hugepages we get one file per page, therefore page size == mapping size. With newly introduced --single-file we now have something that pretends to be a single "uber-huge-page", so we need to specify total size of the mapping here. Oh I get it and recognize the problem here. The actual problem lies in the API rte_eal_get_backfile_info(). backfiles[i].size = hugepage_files[i].size; Should use statfs or hugepage_files[i].size * hugepage_files[i].repeated to calculate the total size. > > BTW, i'm still unhappy about ABI breakage here. I think we could easily add --shared-mem option, which would simply change mapping mode to SHARED. So, we could use it with both hugepages (default) and plain mmap (with --no-hugepages). You mean, use "--no-hugepages --shared-mem" together, right? That makes sense to me. Thanks, Jianfeng > > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia > >