From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id B06D11BAE4 for ; Fri, 27 Oct 2017 14:44:05 +0200 (CEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9RCcwT6094442 for ; Fri, 27 Oct 2017 08:44:04 -0400 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.90]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dv3mmv7sy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Oct 2017 08:44:04 -0400 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Fri, 27 Oct 2017 12:44:03 -0000 Received: from us1a3-smtp05.a3.dal06.isc4sb.com (10.146.71.159) by smtp.notes.na.collabserv.com (10.106.227.141) with smtp.notes.na.collabserv.com ESMTP; Fri, 27 Oct 2017 12:44:01 -0000 Received: from us1a3-mail173.a3.dal06.isc4sb.com ([10.146.71.126]) by us1a3-smtp05.a3.dal06.isc4sb.com with ESMTP id 2017102712440046-573124 ; Fri, 27 Oct 2017 12:44:00 +0000 MIME-Version: 1.0 To: dev@dpdk.org Cc: chaozhu@linux.vnet.ibm.com, bruce.richardson@intel.com From: "Jonas Pfefferle1" Date: Fri, 27 Oct 2017 14:43:58 +0200 X-KeepSent: 6FE7A185:6DB243A1-C12581C6:0043E341; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 X-LLNOutbound: False X-Disclaimed: 7415 X-TNEFEvaluated: 1 x-cbid: 17102712-9717-0000-0000-0000046A9A21 X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.455134; ST=0; TS=0; UL=0; ISC=; MB=0.045509 X-IBM-SpamModules-Versions: BY=3.00007961; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00937206; UDB=6.00472347; IPR=6.00717468; BA=6.00005660; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017742; XFM=3.00000015; UTC=2017-10-27 12:44:03 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2017-10-27 07:32:44 - 6.00007521 x-cbparentid: 17102712-9718-0000-0000-000095A9AF61 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-27_07:, , signatures=0 X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Huge mapping secondary process linux 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: Fri, 27 Oct 2017 12:44:06 -0000 Hi @all, I'm trying to make sense of the hugepage memory mappings in librte=5Feal/linuxapp/eal/eal=5Fmemory.c: * In rte=5Feal=5Fhugepage=5Fattach (line 1347) when we try to do a private mapping on /dev/zero (line 1393) why do we not use MAP=5FFIXED if we need t= he addresses to be identical with the primary process? * On POWER we have this weird business going on where we use MAP=5FHUGETLB because according to this commit: commit 284ae3e9ff9a92575c28c858efd2c85c8de6d440 Author: Chao Zhu Date: Thu Apr 6 15:36:09 2017 +0530 eal/ppc: fix mmap for memory initialization On IBM POWER platform, when mapping /dev/zero file to hugepage memory space, mmap will not respect the requested address hint. This will cause the memory initialization for the second process fails. This patch adds the required mmap flags to make it work. Beside this, users need to set the nr=5Fovercommit=5Fhugepages to expand the VA range. When doing the initialization, users need to set both nr=5Fhugepages and nr=5Fovercommit=5Fhugepages to the same value, like 64, 128, etc. mmap address hints are not respected. Looking at the mmap code in the kernel this is not true entirely however under some circumstances the hint can be ignored ( http://elixir.free-electrons.com/linux/latest/source/arch/powerpc/mm/mmap.c= #L103 ). However I believe we can remove the extra case for PPC if we use MAP=5FFIXED when doing the secondary process mappings because we need them = to be identical anyway. We could also use MAP=5FFIXED when doing the primary process mappings resp. get=5Fvirtual=5Farea if we want to have any guarante= es when specifying a base address. Any thoughts? Thanks, Jonas