From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id A35DF2BB0 for ; Mon, 10 Apr 2017 12:03:52 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id t189so33219166wmt.1 for ; Mon, 10 Apr 2017 03:03:52 -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=07NSp+kQvCJTJLMAiwbbKutc1QY4sr3t/UJoe9pTvRk=; b=H/SntuAfFiD3nIp7mNz5novH8ojnxltQ2wburet0ctMIz8aSEfFe16BsXyRzmVs7EU BTrF6J5TPHYnaV68Cp6ddwoeGH7yDSa1gAxOqpuW+GGoABbi6+PXCE+uWH1uvJ2UniaP TEg0DoecDO3XGBRvlJrmIROs2/NLw3l7GyjzhT2pTdgtu5+l0gF1yqB2oCmLvvqww3sg uPpwqu8zIay6tH7OSmzRMI1liD1b7vNI9OAdBPG0GBEVum4QeAOq43mxM45VfG503bl1 TmzXOg2PaN0O0yu/C5HyP7cfyPNxJ1LoQABtctMuyLbhMOy8mzrXkUhxelPYYMNw967t 4fPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=07NSp+kQvCJTJLMAiwbbKutc1QY4sr3t/UJoe9pTvRk=; b=TgBWAc1vs3nWhbOqPxD4Y+hmoY1KCc8yC3/t8inAtn5/Q3zK8uxNxoY/agKCM+z4aA dllAzPtVqSWouEI6HUBFSLnL1X75dfzdBBLNdhP/BGRYr8fTX1Lj4ZrHy+c07U4Epq9D mGLkAhBPvVT93KcEcsbiKNEb13q4W9DGX5sI9SRwEER/VwFOI0bvwwzEw0Md9DJN9uf9 C1h4YN+8pn5nzvtPNmny28liYZm+64wl2u4IEGBiaaMzbOOYM3Ha8aEeQSa12GxB74CR XyMLEiNXL40m6N1MFP8yvl3GxthXexFBX9fIjWvcVCtOlhHdNVdSoWXX5SFf2XGRpa8+ dzFw== X-Gm-Message-State: AN3rC/7AS5K6x1cwlb+ac9voUlor67An4sR67a+xcaZVv3SWCp5Hzut83p/ldPSamoqlQanW X-Received: by 10.28.156.140 with SMTP id f134mr8629047wme.40.1491818632321; Mon, 10 Apr 2017 03:03:52 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id y72sm5145768wrc.51.2017.04.10.03.03.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 03:03:51 -0700 (PDT) From: Thomas Monjalon To: Sergio Gonzalez Monroy Cc: Ilya Maximets , dev@dpdk.org, David Marchand , Heetae Ahn , Yuanhan Liu , Jianfeng Tan , Neil Horman , Yulong Pei Date: Mon, 10 Apr 2017 12:03:50 +0200 Message-ID: <2538172.OtvTCRC0DK@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1491811459-1647-1-git-send-email-i.maximets@samsung.com> References: <1487250070-13973-1-git-send-email-i.maximets@samsung.com> <1491811459-1647-1-git-send-email-i.maximets@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] mem: balanced allocation of hugepages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 10:03:52 -0000 2017-04-10 11:04, Ilya Maximets: > Currently EAL allocates hugepages one by one not paying > attention from which NUMA node allocation was done. > > Such behaviour leads to allocation failure if number of > available hugepages for application limited by cgroups > or hugetlbfs and memory requested not only from the first > socket. > > Example: > # 90 x 1GB hugepages availavle in a system > > cgcreate -g hugetlb:/test > # Limit to 32GB of hugepages > cgset -r hugetlb.1GB.limit_in_bytes=34359738368 test > # Request 4GB from each of 2 sockets > cgexec -g hugetlb:test testpmd --socket-mem=4096,4096 ... > > EAL: SIGBUS: Cannot mmap more hugepages of size 1024 MB > EAL: 32 not 90 hugepages of size 1024 MB allocated > EAL: Not enough memory available on socket 1! > Requested: 4096MB, available: 0MB > PANIC in rte_eal_init(): > Cannot init memory > > This happens beacause all allocated pages are > on socket 0. > > Fix this issue by setting mempolicy MPOL_PREFERRED for each > hugepage to one of requested nodes in a round-robin fashion. > In this case all allocated pages will be fairly distributed > between all requested nodes. > > New config option RTE_LIBRTE_EAL_NUMA_AWARE_HUGEPAGES > introduced and disabled by default because of external > dependency from libnuma. > > Fixes: 77988fc08dc5 ("mem: fix allocating all free hugepages") > > Signed-off-by: Ilya Maximets Status: Changes Requested per Sergio advice: "I would be inclined towards v3 targeting v17.08."