From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 3212D91D6 for ; Thu, 12 Nov 2015 18:38:16 +0100 (CET) Received: by pabfh17 with SMTP id fh17so71132788pab.0 for ; Thu, 12 Nov 2015 09:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber_org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=D7gHc00nyOmihNwFSfa5c8dtDYhNNCuE8BClzdUTpVw=; b=03u6uY/BaQlIMmJEg8kV8zkYa+LEwi2GibMURvLV8XOLQ9pZlzX6sP9SWZgaGr4O7k Ky1NUpdhOrmHpm2D/7ooXV6og9sdc9/ZlGm+NCjvLn9AQ4QnYXRevOH0wzaaQHSpdxbK VTvgtAd0BMVcqA76cajzPujZKCrRApKYYvj/wXC1CaHBl8jpHoD/PLPXIauVgWTfuwJF wy9OObIP+qVTP0MNbb6JeB1KnAKCl8MIIutyDhAoYxNKfXSck60TYVrLg4ZsQQJ84FYw UkhSF6u7DgXKsTu6K+EzOx3o/yj3MTIIF/YhxO/33WyhEETPv/EPkwqmJ1yExrfhVeYi LlSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=D7gHc00nyOmihNwFSfa5c8dtDYhNNCuE8BClzdUTpVw=; b=J0SSfGCe7Pi08yvjKJQsH6ZtapAzOsAgYL0JXT6UUu9vgbNOYe2Tc5Uo3HaVoR2U02 IfB3RkADOuEvRbwW5zeLLzSl3l+B0094nKJxyqI2O9X5S9WR3A8mlhlgACXKBUpYDWUm v4Kbz4RRHX7KNtLyxJOXdnuGuPY45lBVIgWQ/M0DLFSrvCpTtcjlLR33rZJiw1ZBbsyT GQHvXOQJ3uXM4XZtO4JVm0FKusILy5kBgCVJUXvJwI7wqoRK+xv/VGYbSr4pYw79NKTV m4MSmKJLTCldBPfxGJvny1eMTXp0llEGsVW9AbyNBJXpN+CPyxgyt9eUjFx29OZK7OVF ZIOg== X-Gm-Message-State: ALoCoQkD42jiWs8k7tJjYgNTJmT9V6YPEQICcnBKJl8dl9gZwyXwAD5bskOqheubOETstX1M/+Lk X-Received: by 10.68.114.36 with SMTP id jd4mr24832607pbb.135.1447349895385; Thu, 12 Nov 2015 09:38:15 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id ix2sm15891354pac.15.2015.11.12.09.38.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 09:38:15 -0800 (PST) Date: Thu, 12 Nov 2015 09:38:26 -0800 From: Stephen Hemminger To: Jianfeng Tan Message-ID: <20151112093826.5f287608@xeon-e3> In-Reply-To: <1447287477-49292-1-git-send-email-jianfeng.tan@intel.com> References: <1447287477-49292-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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:38:16 -0000 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.