DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Wilder <dwilder@us.ibm.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, pradeep@us.ibm.com, chaozhu@linux.vnet.ibm.com
Subject: [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9.
Date: Wed, 14 Nov 2018 12:40:51 -0800
Message-ID: <20181114204051.9580-1-dwilder@us.ibm.com> (raw)

Removed the use of MAP_HUGETLB for anonymous mapping on ppc64.  The
MAP_HUGETLB had previously been added to workaround issues on IBM Power8
systems when mapping /dev/zero (see: commit
284ae3e9ff9a92575c28c858efd2c85c8de6d440).  In the current code the
MAP_HUGETLB flag will cause the anonymous mapping to fail on Power9.
Note, Power8 is currently failing to correctly mmap Hugepages, with and
without this change.

Signed-off-by: David Wilder <dwilder@us.ibm.com>
Reviewed-by: Pradeep Satyanarayana <pradeep@us.ibm.com>
This patch corrects problems with virtual address mapping on IBM Power9 system.
I have tested with primary and secondary process tests. IBM power8 systems
continue to fail with and without this change. I am perusing a fix for power8
and will post a patch when its working. As Power9 is our primary platform I
wanted to get this patch out. I will follow up with a power8 fix when its ready.

Please include this patch in 18.11 as well, this patch is not suitable
for 17.11.

 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 3 ---
 lib/librte_eal/linuxapp/eal/eal_memory.c   | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index 48b9c7360..784939566 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -753,9 +753,6 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 	munmap(addr, alloc_sz);
 	flags = MAP_FIXED;
-#ifdef RTE_ARCH_PPC_64
-	flags |= MAP_HUGETLB;
 	new_addr = eal_get_virtual_area(addr, &alloc_sz, alloc_sz, 0, flags);
 	if (new_addr != addr) {
 		if (new_addr != NULL)
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 48b23ce19..6f94621d4 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -847,10 +847,6 @@ alloc_va_space(struct rte_memseg_list *msl)
 	void *addr;
 	int flags = 0;
-#ifdef RTE_ARCH_PPC_64
-	flags |= MAP_HUGETLB;
 	page_sz = msl->page_sz;
 	mem_sz = page_sz * msl->memseg_arr.len;

             reply	other threads:[~2018-11-14 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 20:40 David Wilder [this message]
2018-11-15 10:49 ` Burakov, Anatoly
2018-11-15 15:11 ` Burakov, Anatoly
2018-11-16 23:56   ` dwilder
2018-11-15 18:17 ` Thomas Monjalon

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:

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

  git send-email \
    --in-reply-to=20181114204051.9580-1-dwilder@us.ibm.com \
    --to=dwilder@us.ibm.com \
    --cc=chaozhu@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    --cc=pradeep@us.ibm.com \
    --cc=stable@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git