From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 9F4A4DE0 for ; Thu, 30 Jun 2016 15:34:56 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id a66so119028463wme.0 for ; Thu, 30 Jun 2016 06:34:56 -0700 (PDT) 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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=JB/RdMM81NKgu0AxacQjqdsiP/XWRy8rkdzohWT1TLQ=; b=ucnKxQHuJ94CghE9wZ+qERbAT2puNaSwjukCRGma6G0I+vhJ2dTagf3ZODxn2Bmbg9 m7cyNYnEB1nAFSbNmWOj1PPhGgAIdFUc0jOnjdKHEn9Gio85EUgHA0AruNryphkwQ+9g VbAslxDhdOt1CMtKxKxc0HZoCfQ56xtwbfMyAXIcnBAYzF31XuZm4qXeaGFx2524Yk0I +55SY64XzOMYIQ753PDGSDlS/H5LkI4bLmhou/5++62asly4dnH4muAg1tTrVfTrgqdV 2EvALRJ6WNzNRMFl6+/yQODd6ETgVh0mNYivLjG+qvEbm42PMB2MXIVlpF4lil06MhcA XSOg== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=JB/RdMM81NKgu0AxacQjqdsiP/XWRy8rkdzohWT1TLQ=; b=E+eUDiivc3TuuVmvyXVJ24a1qFnMlneOA6Z9KTaeTC9rwgMeG4Nsa2a9DTadA4/T/B FMRqj+Bodq/87M1HQiW26gmnuWz1yRZ+uoxb9LGIhWyJt+Lb3xHjBStMK5UzZK7QjsGW +k+UDEulO1F3mv9PYUTuDJprTTOP34tu4yWa4+GRUWLSHahXZSfADZm0v/3oHxJWSpKh P6ZuwflkJu17yw8F2yZMjhIxXO3njDKcPbnp+oDsTlQ5dmPizL69OvgFPG1YvBaCQpUn +QI6cx68H//qg62g1KTUwqDzik4k8jKBjCzu0HgbXM+6c7J6kNdyDlF04ajIq9D9HNWH RCrg== X-Gm-Message-State: ALyK8tIpAsVetctPgXowj3Ixtx5uZ4qfgn9Z6/bVJfVVvLzsYC6cAt1/Ekxp709/1T3NhGJL X-Received: by 10.194.34.202 with SMTP id b10mr15189159wjj.47.1467293696325; Thu, 30 Jun 2016 06:34:56 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id u71sm1867616wmu.13.2016.06.30.06.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 06:34:55 -0700 (PDT) From: Thomas Monjalon To: Jianfeng Tan Cc: Sergio Gonzalez Monroy , dev@dpdk.org, nhorman@tuxdriver.com, david.marchand@6wind.com Date: Thu, 30 Jun 2016 15:34:51 +0200 Message-ID: <7052044.2d0khXtSiK@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <5e903b16-453e-100f-fea4-75229e33344f@intel.com> References: <1453661393-85704-1-git-send-email-jianfeng.tan@intel.com> <1464665827-24965-1-git-send-email-jianfeng.tan@intel.com> <5e903b16-453e-100f-fea4-75229e33344f@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5] eal: fix allocating all free hugepages 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, 30 Jun 2016 13:34:56 -0000 > > EAL memory init allocates all free hugepages of the whole system, > > which seen from sysfs, even when applications do not ask so many. > > When there is a limitation on how many hugepages an application can > > use (such as cgroup.hugetlb), or hugetlbfs is specified with an > > option of size (exceeding the quota of the fs), it just fails to > > start even there are enough hugepages allocated. > > > > To fix above issue, this patch: > > - Changes the logic to continue memory init to see if hugetlb > > requirement of application can be addressed by already allocated > > hugepages. > > - To make sure each hugepage is allocated successfully, we add a > > recover mechanism, which relies on a mem access to fault-in > > hugepages, and if it fails with SIGBUS, recover to previously > > saved stack environment with siglongjmp(). > > > > For the case of CONFIG_RTE_EAL_SINGLE_FILE_SEGMENTS (enabled by > > default when compiling IVSHMEM target), it's indispensable to > > mapp all free hugepages in the system. Under this case, it fails > > to start when allocating fails. [...] > > Signed-off-by: Jianfeng Tan > > Acked-by: Neil Horman > > Acked-by: Sergio Gonzalez Monroy Applied, thanks