From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH] eal: make resource initialization more robust Date: Mon, 29 Feb 2016 09:50:27 +0800 Message-ID: <56D3A3E3.1090807@intel.com> References: <1453661393-85704-1-git-send-email-jianfeng.tan@intel.com> <1454066522-80045-1-git-send-email-jianfeng.tan@intel.com> <2119610.dqEXMAUdDm@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BF6422BCC for ; Mon, 29 Feb 2016 02:50:43 +0100 (CET) In-Reply-To: <2119610.dqEXMAUdDm@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Thomas, On 2/29/2016 5:12 AM, Thomas Monjalon wrote: > Hi, > > 2016-01-29 19:22, Jianfeng Tan: >> Current issue: DPDK is not that friendly to container environment, which >> caused by that it pre-alloc resource like cores and hugepages. But there >> are this or that resource limitations, for examples, cgroup, rlimit, >> cpuset, etc. >> >> For cores, this patch makes use of pthread_getaffinity_np to further >> narrow down detected cores before parsing coremask (-c), corelist (-l), >> and coremap (--lcores). >> >> For hugepages, this patch adds a recover mechanism to the case that >> there are no that many hugepages can be used. It relys on a mem access >> to fault-in hugepages, and if fails with SIGBUS, recover to previously >> saved stack environment with siglongjmp(). > They are some interesting ideas. > However, I am not sure a library should try to be so smart silently. > It needs more feedback to decide wether it can be the default behaviour > or an option. > > Please send coremask and hugepage mapping as separate patches as they > are totally different and may be integrated separately. Good advise, thanks! I'll do it. And one more thing FYI, coremask using pthread_getaffinity_np() may have issue on some Linux versions or distros: it excludes isolcpus. This is reported by Sergio Gonzalez Monroy , and I'm still working it out. Thanks, Jianfeng > > Thanks