From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0DE768DB3 for ; Tue, 12 Jan 2016 12:33:06 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 12 Jan 2016 03:33:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,557,1444719600"; d="scan'208";a="858834482" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.221.28]) ([10.237.221.28]) by orsmga001.jf.intel.com with ESMTP; 12 Jan 2016 03:33:04 -0800 From: Sergio Gonzalez Monroy To: Pavel Fedin 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> <5694D9E9.6060704@intel.com> <00e201d14d2b$77e03590$67a0a0b0$@samsung.com> Message-ID: <5694E46F.20508@intel.com> Date: Tue, 12 Jan 2016 11:33:03 +0000 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: <00e201d14d2b$77e03590$67a0a0b0$@samsung.com> 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 2/4] mem: add API to obstain memory-backed file info 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: Tue, 12 Jan 2016 11:33:07 -0000 On 12/01/2016 11:22, Pavel Fedin wrote: > Hello! > >> 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. > .repeated depends on CONFIG_RTE_EAL_SIGLE_FILE_SEGMENTS. By the way, looks like it does the same thing as you are trying to do with --single-file, but with hugepages, doesn't it? I see it's currently used by ivshmem (which is AFAIK very immature and half-abandoned). Similar but not the same. --single-file: a single file for all mapped hugepages. SINGLE_FILE_SEGMENTS: a file per set of physically contiguous mapped hugepages (what DPDK calls memseg , memory segment). So there could be more than one file. Sergio > Or should we just move .repeated out of the #ifdef ? > > Kind regards, > Pavel Fedin > Senior Engineer > Samsung Electronics Research center Russia > >