From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3313A8D91 for ; Thu, 19 Nov 2015 03:15:29 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Nov 2015 18:15:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,315,1444719600"; d="scan'208";a="854186810" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 18 Nov 2015 18:15:28 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Nov 2015 18:15:27 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Nov 2015 18:15:27 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.193]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.223]) with mapi id 14.03.0248.002; Thu, 19 Nov 2015 10:15:25 +0800 From: "Wang, Zhihong" To: Stephen Hemminger , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling Thread-Index: AQHRIho/3S9e7wUFHEmngptQDeHOr56hbdIAgAAxDQCAAPYFAA== Date: Thu, 19 Nov 2015 02:15:24 +0000 Message-ID: <8F6C2BD409508844A0EFC19955BE0941834A76@SHSMSX152.ccr.corp.intel.com> References: <1447817231-10510-1-git-send-email-zhihong.wang@intel.com> <1447817231-10510-3-git-send-email-zhihong.wang@intel.com> <8F6C2BD409508844A0EFC19955BE094183467C@SHSMSX152.ccr.corp.intel.com> <20151118080013.3cad8f5b@samsung9> <59AF69C657FD0841A61C55336867B5B035985B24@IRSMSX103.ger.corp.intel.com> <20151118110906.3e0b3dcd@samsung9> In-Reply-To: <20151118110906.3e0b3dcd@samsung9> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 02:15:29 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Thursday, November 19, 2015 3:09 AM > To: Richardson, Bruce > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessar= y > hugepage zero-filling >=20 > On Wed, 18 Nov 2015 16:13:32 +0000 > "Richardson, Bruce" wrote: >=20 > > > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen > > > Hemminger > > > Sent: Wednesday, November 18, 2015 4:00 PM > > > To: Xie, Huawei > > > Cc: dev@dpdk.org > > > Subject: Re: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove > > > unnecessary hugepage zero-filling > > > > > > On Wed, 18 Nov 2015 12:07:54 +0000 > > > "Xie, Huawei" wrote: > > > > > > > >>> The kernel fills new allocated (huge) pages with zeros. > > > > >>> DPDK just has to touch the pages to trigger the allocation. > > > > I think we shouldn't reply on the assumption that kernel has > > > > zeroed the memory. Kernel zeroes the memory mostly to avoid > > > > information leakage.It could also achieve this by setting each bit = to 1. > > > > What we indeed need to check is later DPDK initialization code > > > > doesn't assume the memory has been zeroed. Otherwise zero only > > > > that part of the memory. Does this makes sense? > > > > > > If all new pages are zero, why does DPDK have to pre-touch the pages > > > at all? > > > > The pages won't actually be mapped into the processes address space unt= il > accessed. > > > > /Bruce >=20 > Isn't that what mmap MAP_POPULATE flag (not currently used) will do. Yes, the MAP_POPULATE does literally the same thing. This flag is implemented since Linux 2.5.46 according to Linux man page, gu= ess that's why DPDK fault the page tables manually in the first place. :) I think we can use this flag since it makes the code clearer. /Zhihong