* [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9.
@ 2018-11-14 20:40 David Wilder
2018-11-15 10:49 ` Burakov, Anatoly
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David Wilder @ 2018-11-14 20:40 UTC (permalink / raw)
To: dev; +Cc: stable, pradeep, chaozhu
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);
unmapped:
flags = MAP_FIXED;
-#ifdef RTE_ARCH_PPC_64
- flags |= MAP_HUGETLB;
-#endif
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;
-#endif
-
page_sz = msl->page_sz;
mem_sz = page_sz * msl->memseg_arr.len;
--
2.19.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9.
2018-11-14 20:40 [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9 David Wilder
@ 2018-11-15 10:49 ` Burakov, Anatoly
2018-11-15 15:11 ` Burakov, Anatoly
2018-11-15 18:17 ` Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Burakov, Anatoly @ 2018-11-15 10:49 UTC (permalink / raw)
To: David Wilder, dev; +Cc: stable, pradeep, chaozhu
On 14-Nov-18 8:40 PM, David Wilder wrote:
> 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>
> ---
Can't test it (obviously), but LGTM
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9.
2018-11-14 20:40 [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9 David Wilder
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
2 siblings, 1 reply; 5+ messages in thread
From: Burakov, Anatoly @ 2018-11-15 15:11 UTC (permalink / raw)
To: David Wilder, dev; +Cc: stable, pradeep, chaozhu
On 14-Nov-18 8:40 PM, David Wilder wrote:
> Please include this patch in 18.11 as well, this patch is not suitable
> for 17.11.
>
Small note: while this patch is not suitable for 17.11 as is, it can be
made suitable if you drop the memalloc part. I copied this flag from old
memory allocation code, so if 17.11 has this flag there, you can fix it
in 17.11 as well.
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9.
2018-11-15 15:11 ` Burakov, Anatoly
@ 2018-11-16 23:56 ` dwilder
0 siblings, 0 replies; 5+ messages in thread
From: dwilder @ 2018-11-16 23:56 UTC (permalink / raw)
To: Burakov, Anatoly; +Cc: dev, stable, pradeep, chaozhu
On 2018-11-15 07:11, Burakov, Anatoly wrote:
> On 14-Nov-18 8:40 PM, David Wilder wrote:
>
>> Please include this patch in 18.11 as well, this patch is not suitable
>> for 17.11.
>> Small note: while this patch is not suitable for 17.11 as is, it can
>> be made suitable if you drop the memalloc part. I copied this flag
>> from old memory allocation code, so if 17.11 has this flag there, you
>> can fix it in 17.11 as well.
Thank you
I am working on a 17.11 fix as well, the issue is a little different on
17.11 but removing the flag is indeed part of the fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9.
2018-11-14 20:40 [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9 David Wilder
2018-11-15 10:49 ` Burakov, Anatoly
2018-11-15 15:11 ` Burakov, Anatoly
@ 2018-11-15 18:17 ` Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-11-15 18:17 UTC (permalink / raw)
To: David Wilder; +Cc: dev, stable, pradeep, chaozhu, techboard
Hi,
14/11/2018 21:40, David Wilder:
> 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.
We need to document that Power8 is not supported in DPDK 18.11.
Please send a patch to explain it in "known issues":
http://doc.dpdk.org/guides/rel_notes/release_18_11.html#known-issues
We may also note that IBM POWER support is in alpha stage:
http://git.dpdk.org/dpdk/tree/MAINTAINERS#n236
Thanks in advance
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-16 23:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14 20:40 [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9 David Wilder
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
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).