From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D5DE8957E for ; Wed, 25 Nov 2015 19:25:12 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 25 Nov 2015 10:25:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,343,1444719600"; d="scan'208";a="859340238" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 25 Nov 2015 10:25:10 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 25 Nov 2015 10:24:56 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 25 Nov 2015 10:24:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.83]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.193]) with mapi id 14.03.0248.002; Thu, 26 Nov 2015 02:24:54 +0800 From: "Xie, Huawei" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling Thread-Index: AQHRJaGKxL2Z5sKfnk+JPinAT7c0ug== Date: Wed, 25 Nov 2015 18:24:54 +0000 Message-ID: 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> <564D930C.7060108@intel.com> <20151122200743.34511547@xeon-e3> <20151122225220.1fd15ba8@xeon-e3> 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: Wed, 25 Nov 2015 18:25:13 -0000 On 11/23/2015 2:52 PM, Stephen Hemminger wrote:=0A= > On Mon, 23 Nov 2015 05:05:21 +0000=0A= > "Xie, Huawei" wrote:=0A= >=0A= >> On 11/23/2015 12:07 PM, Stephen Hemminger wrote:=0A= >>> On Mon, 23 Nov 2015 03:46:31 +0000=0A= >>> "Xie, Huawei" wrote:=0A= >>>=0A= >>>>> Why cannot we rely on the kernel zeroing the memory ?=0A= >>>>> If that behavior were to change, then we can zero out the memory=0A= >>>>> ourselves. =0A= >>>> It is undocumented kernel behavior. My opinion is if not a big burden,= =0A= >>>> zero out the needed memory ourselves, otherwise resort to this kernel= =0A= >>>> behavior.=0A= >>> Really, I think it is more an oversight of missing documentation,=0A= >>> the kernel has always (and will continue) to zero out memory that is gi= ven=0A= >>> to a process. If it didn't it would be a massive security hole.=0A= >> Agree. I believe this behavior will not change in future. For the=0A= >> security issue, kernel could also set all bits like to 1. Just wonder if= =0A= >> this is best practice and whether there are other user space programs=0A= >> rely on this behavior.=0A= >>=0A= > Glibc almost certainly depends on this, because heap is grown by mmaping = addtional=0A= > memory.=0A= Thanks. It is OK, but still don't feel good, :). It is like that we=0A= require the clear_user_page(and other unix, windows equivalent) is=0A= always memset(ptr, 0 , PAGE_SIZE). To me, memset(ptr, 1, PAGE_SIZE)=0A= doesn't make difference.=0A= =0A=