DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Wei <johntwei@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Fwd: EAL: map_all_hugepages(): mmap failed: Cannot allocate memory
Date: Thu, 17 Mar 2016 15:41:25 -0700	[thread overview]
Message-ID: <CAGaeUpr6KSp2ToRwYG_xx8BQP=8ZLQVr4gfKcWceJ5Bb_ndTKw@mail.gmail.com> (raw)
In-Reply-To: <CAGaeUppJkrWXxcx5tMyeeJiW2ivGmPVAimYW1zNA4A=pSV2Z_g@mail.gmail.com>

I am setting up OVS inside a Linux container. This OVS is built using DPDK
library.
During the startup of ovs-vswitchd, it core dumped due to fail to mmap.
      in eal_memory.c
       virtaddr = mmap(vma_addr, hugepage_sz, PROT_READ | PROT_WRITE,
                MAP_SHARED, fd, 0);

This call is made inside a for loop that loops through all the pages and
mmap them.
My server has two cores, and I allocated 8192 2MB pages.
The mmap for the first 4096 pages were successful. It failed when trying to
map 4096th page.

Can someone help me understand when the mmap for the first 4096 pages were
successful and it failed on 4096th page?


John



ovs-vswitchd --dpdk -c 0x1 -n 4 -l 1 --file-prefix ct0000- --socket-mem
128,128 -- unix:$DB_SOCK --pidfile --detach --log-file=ct.log


EAL: Detected lcore 23 as core 5 on socket 1
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 24 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: VFIO modules not all loaded, skip VFIO support...
EAL: Setting up physically contiguous memory...
EAL: map_all_hugepages(): mmap failed: Cannot allocate memory
EAL: Failed to mmap 2 MB hugepages
PANIC in rte_eal_init():
Cannot init memory
7: [ovs-vswitchd() [0x411f15]]
6: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7ff5f6133b15]]
5: [ovs-vswitchd() [0x4106f9]]
4: [ovs-vswitchd() [0x66917d]]
3: [ovs-vswitchd() [0x42b6f5]]
2: [ovs-vswitchd() [0x40dd8c]]
1: [ovs-vswitchd() [0x56b3ba]]
Aborted (core dumped)

       reply	other threads:[~2016-03-17 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGaeUppJkrWXxcx5tMyeeJiW2ivGmPVAimYW1zNA4A=pSV2Z_g@mail.gmail.com>
2016-03-17 22:41 ` John Wei [this message]
2016-03-18  2:51   ` Tan, Jianfeng
2016-03-18 17:24     ` John Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGaeUpr6KSp2ToRwYG_xx8BQP=8ZLQVr4gfKcWceJ5Bb_ndTKw@mail.gmail.com' \
    --to=johntwei@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).