From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=L+GoKb7CYDZ1VxpVuZmvxN58DU6LAmmodNnhPArvtss=; b=ffMAYJZXw/8OnTjTZMekiAc0jWVsw5HW2rajZTB/SbGoc5jSg1MfY4Vi/GUqmmMTVx KYGq0cAu6hoZHRhDNb38hdOtnirkVbzCunOguQedvIWvZljqeKz6tN1NND7VTS8YqxBz iMk+EPelbjX054KhpeeuI8EuBrBNH7ETMzqYgFOqebCJmgxSDAk3FyH3xXTWU8eJj9qf 9wP7wgYfaXIOW411Xgzif/IGbiAZB0HeyNBuAZvapFgyebIfLWH2ObUi+9TGF77UeBVh kL02wHIv9H7wOHVOiLwWYrTl1p5cM65eA86tMQMXJJVeSyxQwMXu1Bm5QuDcgbMnAd4m UcsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=L+GoKb7CYDZ1VxpVuZmvxN58DU6LAmmodNnhPArvtss=; b=BWYPIzWRxHafo3riqydwdMY9ZS6wjEzHupiOyIqrdi73xyiOd8hPLupPbF86HNKAYb M2ck/6CwZkWvM66GlN4S+11eKaP9qnVveI6nhdYShwww0oUqMeFfqGANumvThco1yxQs nNCVfCLUuYoJzxaBBCG9jeykNtVjQKig5zqNsUpgjm9tfXgV0DD9y5LZGtXSjiUISzwD WNQGmvPq0gisRuWCd3LxrD+7piY1GHFIBp1sobHZ7PaKWD/bxsnzBOTcktawfzE9YTPX VT8al1FPWSS1j5JEKlGxHD4dOScd9T8luGQdT7KX68+9jMMSIzs36dOn3p4OXUe1sXSn Ui/g== X-Gm-Message-State: ALoCoQnTKvY9t5pgzD8U1l6qhKHdt8DqZbr0fiXbkfGjK0Mtywku3/lSX1qdKevz59nDA7r75JcD X-Received: by 10.194.11.67 with SMTP id o3mr17887507wjb.3.1447350643016; Thu, 12 Nov 2015 09:50:43 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id cr5sm15595060wjb.16.2015.11.12.09.50.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 09:50:42 -0800 (PST) From: Thomas Monjalon To: Stephen Hemminger Date: Thu, 12 Nov 2015 18:49:30 +0100 Message-ID: <2366990.hyhGG8iGNs@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151112093826.5f287608@xeon-e3> References: <1447287477-49292-1-git-send-email-jianfeng.tan@intel.com> <20151112093826.5f287608@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] mem: fix how to calculate space left in a hugetlbfs 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: Thu, 12 Nov 2015 17:50:43 -0000 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