[dpdk-dev] [PATCH] mem: fix how to calculate space left in a hugetlbfs

Stephen Hemminger stephen at networkplumber.org
Thu Nov 12 18:38:26 CET 2015


On Thu, 12 Nov 2015 08:17:57 +0800
Jianfeng Tan <jianfeng.tan at intel.com> 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 <jianfeng.tan at intel.com>

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.


More information about the dev mailing list