From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 927F21B20E for ; Wed, 14 Nov 2018 21:41:10 +0100 (CET) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAEKXTD6031853 for ; Wed, 14 Nov 2018 15:41:10 -0500 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nrrsynx71-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Nov 2018 15:41:09 -0500 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Nov 2018 20:41:09 -0000 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 14 Nov 2018 20:41:06 -0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAEKf5mO18022616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Nov 2018 20:41:06 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D7DC66A04F; Wed, 14 Nov 2018 20:41:05 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F09516A047; Wed, 14 Nov 2018 20:41:04 +0000 (GMT) Received: from oc8377887825.ibm.com (unknown [9.85.226.176]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 14 Nov 2018 20:41:04 +0000 (GMT) From: David Wilder To: dev@dpdk.org Cc: stable@dpdk.org, pradeep@us.ibm.com, chaozhu@linux.vnet.ibm.com Date: Wed, 14 Nov 2018 12:40:51 -0800 X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18111420-8235-0000-0000-00000E280725 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010049; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01117469; UDB=6.00579608; IPR=6.00897578; MB=3.00024164; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-14 20:41:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111420-8236-0000-0000-0000435C2394 Message-Id: <20181114204051.9580-1-dwilder@us.ibm.com> Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-14_16:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=680 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811140183 Subject: [dpdk-dev] [PATCH] mem: Fix anonymous mapping on Power9. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 20:41:10 -0000 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 Reviewed-by: Pradeep Satyanarayana --- 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