From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id F00A7532D for ; Thu, 19 Nov 2015 10:18:29 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 19 Nov 2015 01:18:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,317,1444719600"; d="scan'208";a="854640230" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.221.29]) ([10.237.221.29]) by fmsmga002.fm.intel.com with ESMTP; 19 Nov 2015 01:18:26 -0800 To: "Wang, Zhihong" , "Xie, Huawei" , Stephen Hemminger , "Richardson, Bruce" 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> <8F6C2BD409508844A0EFC19955BE0941834A76@SHSMSX152.ccr.corp.intel.com> <8F6C2BD409508844A0EFC19955BE0941834B7D@SHSMSX152.ccr.corp.intel.com> From: Sergio Gonzalez Monroy Message-ID: <564D93E2.6060509@intel.com> Date: Thu, 19 Nov 2015 09:18:26 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <8F6C2BD409508844A0EFC19955BE0941834B7D@SHSMSX152.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 09:18:30 -0000 On 19/11/2015 06:32, Wang, Zhihong wrote: >> -----Original Message----- >> From: Xie, Huawei >> Sent: Thursday, November 19, 2015 2:05 PM >> To: Wang, Zhihong ; Stephen Hemminger >> ; Richardson, Bruce >> >> Cc: dev@dpdk.org >> Subject: Re: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary >> hugepage zero-filling >> >> On 11/19/2015 10:16 AM, Wang, Zhihong wrote: >>>> -----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 >>>> unnecessary hugepage zero-filling >>>> >>>> On Wed, 18 Nov 2015 16:13:32 +0000 >>>> "Richardson, Bruce" wrote: >>>> >>>>>> -----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 >>>>> until >>>> accessed. >>>>> /Bruce >>>> 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, guess 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. >> The manual says MAP_POPULATE is only supported for private mappings since >> Linux 2.6.23. > I've done check before and MAP_SHARED | MAP_POPULATE worked together correctly. Is there any implicit complication here? > None that I can see. Sergio >>> /Zhihong >>> >>>