DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] mem: Fix anonymous mapping on Power9.
@ 2018-11-16  2:08 David Wilder
  2018-11-16 10:18 ` ´ð¸´: " Chao Zhu
  0 siblings, 1 reply; 2+ messages in thread
From: David Wilder @ 2018-11-16  2:08 UTC (permalink / raw)
  To: dev; +Cc: stable, pradeep, chaozhu, thomas

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>
---
I updated the documentation and release notes as suggested by Thomas.
Thank you.

 MAINTAINERS                                | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst          | 6 ------
 doc/guides/rel_notes/release_18_11.rst     | 1 +
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 3 ---
 lib/librte_eal/linuxapp/eal/eal_memory.c   | 4 ----
 5 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 19353ac89..c4d2fd086 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -233,7 +233,7 @@ F: drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
 F: drivers/net/i40e/i40e_rxtx_vec_neon.c
 F: drivers/net/virtio/virtio_rxtx_simple_neon.c
 
-IBM POWER
+IBM POWER (alpha)
 M: Chao Zhu <chaozhu@linux.vnet.ibm.com>
 F: lib/librte_eal/common/arch/ppc_64/
 F: lib/librte_eal/common/include/arch/ppc_64/
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index e2230f37b..c02ec28c1 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -183,12 +183,6 @@ On a NUMA machine, pages should be allocated explicitly on separate nodes::
 
     For 1G pages, it is not possible to reserve the hugepage memory after the system has booted.
 
-    On IBM POWER system, the nr_overcommit_hugepages should be set to the same value as nr_hugepages.
-    For example, if the required page number is 128, the following commands are used::
-
-        echo 128 > /sys/kernel/mm/hugepages/hugepages-16384kB/nr_hugepages
-        echo 128 > /sys/kernel/mm/hugepages/hugepages-16384kB/nr_overcommit_hugepages
-
 Using Hugepages with the DPDK
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
index 51d007582..87188a6be 100644
--- a/doc/guides/rel_notes/release_18_11.rst
+++ b/doc/guides/rel_notes/release_18_11.rst
@@ -532,6 +532,7 @@ Known Issues
   driver; the Linux netvsc device must be brought up before the netvsc device is
   unbound and passed to the DPDK.
 
+* IBM Power8 is not supported by this release of DPDK. IBM Power9 is suported.
 
 Tested Platforms
 ----------------
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] 2+ messages in thread

* ´ð¸´: [PATCH v2] mem: Fix anonymous mapping on Power9.
  2018-11-16  2:08 [dpdk-dev] [PATCH v2] mem: Fix anonymous mapping on Power9 David Wilder
@ 2018-11-16 10:18 ` Chao Zhu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Zhu @ 2018-11-16 10:18 UTC (permalink / raw)
  To: David Wilder, dev; +Cc: stable, pradeep, thomas

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4240 bytes --]



> -----ÓʼþÔ­¼þ-----
> ·¢¼þÈË: David Wilder <dwilder@us.ibm.com>
> ·¢ËÍʱ¼ä: 2018Äê11ÔÂ16ÈÕ 10:08
> ÊÕ¼þÈË: dev@dpdk.org
> ³­ËÍ: stable@dpdk.org; pradeep@us.ibm.com; chaozhu@linux.vnet.ibm.com;
> thomas@monjalon.net
> Ö÷Ìâ: [PATCH v2] mem: Fix anonymous mapping on Power9.
>
> 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>
> ---
> I updated the documentation and release notes as suggested by Thomas.
> Thank you.
>
>  MAINTAINERS                                | 2 +-
>  doc/guides/linux_gsg/sys_reqs.rst          | 6 ------
>  doc/guides/rel_notes/release_18_11.rst     | 1 +
>  lib/librte_eal/linuxapp/eal/eal_memalloc.c | 3 ---
>  lib/librte_eal/linuxapp/eal/eal_memory.c   | 4 ----
>  5 files changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 19353ac89..c4d2fd086 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -233,7 +233,7 @@ F: drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
>  F: drivers/net/i40e/i40e_rxtx_vec_neon.c
>  F: drivers/net/virtio/virtio_rxtx_simple_neon.c
>
> -IBM POWER
> +IBM POWER (alpha)
>  M: Chao Zhu <chaozhu@linux.vnet.ibm.com>
>  F: lib/librte_eal/common/arch/ppc_64/
>  F: lib/librte_eal/common/include/arch/ppc_64/
> diff --git a/doc/guides/linux_gsg/sys_reqs.rst
> b/doc/guides/linux_gsg/sys_reqs.rst
> index e2230f37b..c02ec28c1 100644
> --- a/doc/guides/linux_gsg/sys_reqs.rst
> +++ b/doc/guides/linux_gsg/sys_reqs.rst
> @@ -183,12 +183,6 @@ On a NUMA machine, pages should be allocated
> explicitly on separate nodes::
>
>      For 1G pages, it is not possible to reserve the hugepage memory after
> the system has booted.
>
> -    On IBM POWER system, the nr_overcommit_hugepages should be set
> to the same value as nr_hugepages.
> -    For example, if the required page number is 128, the following
> commands are used::
> -
> -        echo 128 >
> /sys/kernel/mm/hugepages/hugepages-16384kB/nr_hugepages
> -        echo 128 >
> /sys/kernel/mm/hugepages/hugepages-16384kB/nr_overcommit_hugepages
> -
>  Using Hugepages with the DPDK
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> diff --git a/doc/guides/rel_notes/release_18_11.rst
> b/doc/guides/rel_notes/release_18_11.rst
> index 51d007582..87188a6be 100644
> --- a/doc/guides/rel_notes/release_18_11.rst
> +++ b/doc/guides/rel_notes/release_18_11.rst
> @@ -532,6 +532,7 @@ Known Issues
>    driver; the Linux netvsc device must be brought up before the netvsc
> device is
>    unbound and passed to the DPDK.
>
> +* IBM Power8 is not supported by this release of DPDK. IBM Power9 is
> suported.
>
>  Tested Platforms
>  ----------------
> 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
Thanks David!  Looking forward to the patch support for P8.

Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-16 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-16  2:08 [dpdk-dev] [PATCH v2] mem: Fix anonymous mapping on Power9 David Wilder
2018-11-16 10:18 ` ´ð¸´: " Chao Zhu

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 \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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