From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 23F60DE3 for ; Sun, 28 Feb 2016 22:14:21 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id p65so45435740wmp.1 for ; Sun, 28 Feb 2016 13:14:21 -0800 (PST) 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:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=dh4WyZsYGEWr/3QtnXXsH8B3005cwPiXKgp1ClMjNWE=; b=uLrsXkmem+4XbBQYLuK1mzaFCH/Y8f8j2OXpvqCGQIveTFPSN471YSDqbPLcOgB0V+ J7nErqc2Ic8ZOPC3FgLX6o/teKYh5fCKM2DEHV6JEuYhGYiQTEpaNd+jkIVbMn8DwyMy AXGN1IYBl9CWSp2hgPShvvftCGD172xJZEDHD1X798DfPl+2iEDExsc7lPvk6Y/Lst8r EVZuc8vaFl44Pn0WlGQBtvGoyg5dTb4LKHncS9xnIaAfizYzxWJENPw+xEhbuTp/lRO+ hRhICfbHt6jOfBytQSU/aordeLvwI9XMl+m6oIFTFt49GdQHWC+CEUd5czK94yCHHbPa djgA== 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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=dh4WyZsYGEWr/3QtnXXsH8B3005cwPiXKgp1ClMjNWE=; b=Rt4ikNP0K48bORRChgHEogLQR6Uq/D0CwZ8GRUsibORuBLtBBHRWfnpFtHWBQCmPgM J3zESCqsa1dkIKzXlUvkSzDsFh5P+BlUqmO3nuQD8Org/sTa0kDui4uvsbTFrgqrcMDx n64bQ/WypkyWOpljDEqtDHc6duO0lkhcXEnDg8v3URkrwqyxSy04WrNvco9Gtdw81nFc Yzk+aYJJ1hBcIl7ivRWrnigQNSfrPacVxpa+YxeebrVZGvWVEOZ054iNaa0bt+WfkH5x JcZ1Awn+zNW1HDG9PRHShEz3IXYF7C4yOVt9+nxy1hWaoFgQxgKEzxfBEnaUzshLjrmW RBng== X-Gm-Message-State: AD7BkJIaot+2Ak0YK4oKtE6lr8YeES+Dc93QbLDY+7n0qLq2Xcwk8aHPWNrFN49r/IS91y/K X-Received: by 10.28.104.131 with SMTP id d125mr3846407wmc.99.1456694059601; Sun, 28 Feb 2016 13:14:19 -0800 (PST) Received: from xps13.localnet (171.36.101.84.rev.sfr.net. [84.101.36.171]) by smtp.gmail.com with ESMTPSA id r62sm13212542wmd.15.2016.02.28.13.14.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Feb 2016 13:14:18 -0800 (PST) From: Thomas Monjalon To: Jianfeng Tan Date: Sun, 28 Feb 2016 22:12:46 +0100 Message-ID: <2119610.dqEXMAUdDm@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1454066522-80045-1-git-send-email-jianfeng.tan@intel.com> References: <1453661393-85704-1-git-send-email-jianfeng.tan@intel.com> <1454066522-80045-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: make resource initialization more robust 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: Sun, 28 Feb 2016 21:14:21 -0000 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. Thanks