From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Fedin Subject: Re: [PATCH 2/4] mem: add API to obstain memory-backed file info Date: Tue, 12 Jan 2016 14:22:03 +0300 Message-ID: <00e201d14d2b$77e03590$67a0a0b0$@samsung.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> <5694D9E9.6060704@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: nakajima.yoshihiro@lab.ntt.co.jp, "'Michael S. Tsirkin'" , dev@dpdk.org, ann.zhuangyanying@huawei.com To: "'Tan, Jianfeng'" , 'Rich Lane' Return-path: Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by dpdk.org (Postfix) with ESMTP id 88D5A8E59 for ; Tue, 12 Jan 2016 12:22:07 +0100 (CET) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O0U009H57KUY990@mailout4.w1.samsung.com> for dev@dpdk.org; Tue, 12 Jan 2016 11:22:06 +0000 (GMT) In-reply-to: <5694D9E9.6060704@intel.com> Content-language: ru 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! > Oh I get it and recognize the problem here. The actual problem lies in > the API rte_eal_get_backfile_info(). > backfiles[i].size =3D 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). Or should we just move .repeated out of the #ifdef ? Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia