From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7B339379E for ; Mon, 21 Dec 2015 09:34:08 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 21 Dec 2015 00:34:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,458,1444719600"; d="scan'208";a="845616256" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 21 Dec 2015 00:34:07 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 21 Dec 2015 00:34:06 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 21 Dec 2015 00:34:06 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.190]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.151]) with mapi id 14.03.0248.002; Mon, 21 Dec 2015 16:34:06 +0800 From: "Qiu, Michael" To: "Tan, Jianfeng" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] mem: calculate space left in a hugetlbfs Thread-Index: AQHRIeWCb6lpIZpQek6Xn/ZnQypFPA== Date: Mon, 21 Dec 2015 08:34:05 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028622EFAF93@SHSMSX101.ccr.corp.intel.com> References: <1447287477-49292-1-git-send-email-jianfeng.tan@intel.com> <1447814537-133466-1-git-send-email-jianfeng.tan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] mem: 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: Mon, 21 Dec 2015 08:34:08 -0000 On 2015/11/18 17:42, Jianfeng Tan wrote:=0A= > Currently DPDK does not respect the quota of a hugetblfs mount.=0A= > It will fail to init the EAL because it tries to map the number of=0A= > free hugepages in the system rather than using the number specified=0A= > in the quota for that mount.=0A= >=0A= > To solve this issue, we take the quota into consideration when=0A= > calculating the number of hugepages to map. We use either the number=0A= > specified in the quota, or number of available hugepages, whichever=0A= > is lower.=0A= >=0A= > There are possible race conditions when multiple applications=0A= > allocate hugepages in different hugetlbfs mounts of the same size,=0A= > so the suggested system would have a pool with enough hugepages for=0A= > all hugetlbfs mount quotas.=0A= >=0A= > There is, however, still an open issue with=0A= > CONFIG_RTE_EAL_SINGLE_FILE_SEGMENTS. When this option is enabled=0A= > (IVSHMEM target does this by default), having hugetlbfs mounts with=0A= > quota will fail to remap hugepages because it relies on having=0A= > mapped all free hugepages in the system.=0A= >=0A= > Signed-off-by: Jianfeng Tan =0A= >=0A= =0A= Acked-by: Michael Qiu =0A=