2015-11-12 09:38, Stephen Hemminger: > 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.
Maybe, maybe not :) Sergio arleady looked at it: http://dpdk.org/ml/archives/dev/2015-July/022080.html