From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mem: fix how to calculate space left in a hugetlbfs Date: Thu, 12 Nov 2015 18:49:30 +0100 Message-ID: <2366990.hyhGG8iGNs@xps13> References: <1447287477-49292-1-git-send-email-jianfeng.tan@intel.com> <20151112093826.5f287608@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 41988A2F for ; Thu, 12 Nov 2015 18:50:43 +0100 (CET) Received: by wmec201 with SMTP id c201so45437581wme.0 for ; Thu, 12 Nov 2015 09:50:43 -0800 (PST) In-Reply-To: <20151112093826.5f287608@xeon-e3> 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" 2015-11-12 09:38, Stephen Hemminger: > On Thu, 12 Nov 2015 08:17:57 +0800 > Jianfeng Tan wrote: > > > This patch enables calculating space left in a hugetlbfs. > > There are three sources to get the information: 1. from > > sysfs; 2. from option size specified when mount; 3. use > > statfs. We should use the minimum one of these three sizes. > > > > Signed-off-by: Jianfeng Tan > > Thanks, the hugetlbfs usage up until now has been rather brute force. > I wonder if long term it might be better to defer all this stuff > to another library like libhugetlbfs. > https://github.com/libhugetlbfs/libhugetlbfs > > Especially wen dealing with other architectures it might provide > some nice abstraction. Maybe, maybe not :) Sergio arleady looked at it: http://dpdk.org/ml/archives/dev/2015-July/022080.html