From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f193.google.com (mail-ot0-f193.google.com [74.125.82.193]) by dpdk.org (Postfix) with ESMTP id D9B271B392 for ; Tue, 26 Dec 2017 00:32:46 +0100 (CET) Received: by mail-ot0-f193.google.com with SMTP id q39so23794715otb.8 for ; Mon, 25 Dec 2017 15:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Tc1QJgoRg6zkS83qe+4YZWioXbv/qdO0W/Vh+to+BZY=; b=SpkTMLTWf1hstC6puFCco54N7XiCFD231u3khnL2y+dMZ5VPX7mIkYsLSlOyPqpGlg E8oho+SNSTyMKQWSLGcpAAP1HW96ETcRlaL2wi3ZSbKyt74+INr6hwR0x0//6T3RMMm4 lbSmmz0jdbXSoRVEl6Ec6btdMkjUIu8Av5ax8uKYDdKByXiawFnQRWdg+t5FyH3yhY2p xOad4f3GZQt/TqA4xX9j6IbO8KFU73tGh1qfQALUedLO5t4AqXxE1JdBXWY2QPtvCM34 aZGFX6ks90ixDB9NTT/tgYx7CWy95d2aNPg1sBpKoxTMmroYcdg3yWm7TerOddXooQJ9 j/8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Tc1QJgoRg6zkS83qe+4YZWioXbv/qdO0W/Vh+to+BZY=; b=CQVAic/a/dgtK/9e7N55HACSEdyVVFsL2TZyQrB5eZN16Zje9PoXPXtUqLXa22iHOf MZEbvcSKAAnOBVUfR0nknEaFWikIagYq4XfAs258oUjwPfpp1bE9AviorPa9p2ufpfSm hylUcl5FVgibDtbK8CnZFEHPwypUNa1R+9w6SaPfw8nRi/vAQmgDHgz/DRZ1fsy9UTKD UaxQvkKj8urd0W6KwzpQkFo7GVE9HVLlbms5YCgBdwsaKq3V3S0MaYZicc0P8Oeo5bpU BOcoF0Dk8rNkUceVtYkKfIpO/qlZV/1YjWqHjVOI7tPmsURDwKgX3ZN+bnlryXJPYmud TXaQ== X-Gm-Message-State: AKGB3mI8zUVoGC6vXjUAg7Ya8XxEh1OKTfsRCyvGskkkaIt/3S+L9GRz iq/pg5X8JPid4l79NsTR52JVgQErGh/2uQz5UtE= X-Google-Smtp-Source: ACJfBouwrlzuUCJ5cKO8rqD9AShZQAek5hAeLhs6hJoWIu6yKV8qqWdQP4Z94f29ogXAP3kj4ILcHplpA/zoWMy922E= X-Received: by 10.157.50.244 with SMTP id u107mr1194291otb.92.1514244766178; Mon, 25 Dec 2017 15:32:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.34.226 with HTTP; Mon, 25 Dec 2017 15:32:45 -0800 (PST) In-Reply-To: References: From: gyp sud Date: Mon, 25 Dec 2017 18:32:45 -0500 Message-ID: To: James Bensley Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-users] No free hugepages reported in hugepages when running DPDK helloworld example X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 23:32:47 -0000 Thanks, James. I looked through some kernel documentation regarding hugetlbpage support and DPDK source code (eal_hugepage_info.c in particular), it appears the code was looking in /sys/kernel/mm/hugepages the root huge page control directory. I guess since my system supports both pse and pdpe1gb flag, so 2MB and 1GB pages are supported. Thus my /sys/kernel/mm/hugepages has hugepages-1048576kB and hugepages-2048kB directories. helloworld was searching through both directories but complained about 1GB because I've only allocated pages for 2MB as you pointed out. So that warning about 1GB is benign. Cheers, Gyp On Sun, Dec 24, 2017 at 5:53 AM, James Bensley wrote: > On 23 December 2017 at 21:44, gyp sud wrote: >> I downloaded and built dpdk-stable-16.11.4 version (using >> x86_64-native-linuxapp-gcc target). I'm running Ubuntu 16.04.3 LTS. >> After setting up hugepages according to http://dpdk.org/doc/quick-start or >> http://dpdk.org/doc/guides-16.04/linux_gsg/sys_reqs.html >> >> mkdir -p /mnt/huge >> mount -t hugetlbfs nodev /mnt/huge >> echo 64 > >> /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages >> >> I can see the hugepages fine. >> >> #cat /proc/meminfo | grep >> HugeAnonHugePages: 284672 kB >> ShmemHugePages: 0 kB >> HugePages_Total: 64 >> HugePages_Free: 64 >> HugePages_Rsvd: 0 >> HugePages_Surp: 0 >> Hugepagesize: 2048 kB >> >> But when I run the helloWorld example, it complained about no free >> hugepages, see below. >> >> #./build/helloworld -l 0-3 -n 2 >> EAL: Detected 4 lcore(s) >> EAL: No free hugepages reported in hugepages-1048576kB >> EAL: Probing VFIO support... >> hello from core 1 >> hello from core 2 >> hello from core 3 >> hello from core 0 >> >> Also, the memory info showed free hugepages were all gone. >> #cat /proc/meminfo | grep Huge >> AnonHugePages: 380928 kB >> ShmemHugePages: 0 kB >> HugePages_Total: 64 >> HugePages_Free: 0 >> HugePages_Rsvd: 0 >> HugePages_Surp: 0 >> Hugepagesize: 2048 kB >> >> Any idea why this is happening? >> >> Gyp > > Note the size of the HugePages in the EAL output > "hugepages-1048576kB", you allocated 2MB HugePages, this message is > about 1G HugePages. > > 1GB HugePages can only be allocated at boot up. It's "OK" though, 1GB > HugePages aren't required, as you saw the application used the 2GB > HugePages you allocated. For some applications and workloads that > require lots of memory fewer 1GB pages can have a performance increase > over more smaller 2MB HugePages. > > Obviously it goes without saying it's usually best to install the most > recent DPDK version and check the most recent documentation URL, here > you will find info about setting up 1GB HugePages if you want to do > that: > dpdk.org/doc/guides/linux_gsg/sys_reqs.html > > Cheers, > James.