From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling Date: Wed, 18 Nov 2015 08:00:13 -0800 Message-ID: <20151118080013.3cad8f5b@samsung9> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Xie, Huawei" Return-path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by dpdk.org (Postfix) with ESMTP id 66F145A92 for ; Wed, 18 Nov 2015 17:00:18 +0100 (CET) Received: by padhx2 with SMTP id hx2so48737020pad.1 for ; Wed, 18 Nov 2015 08:00:17 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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? I thought there as some optimization to initialize hugepages since Oracle has same problem with their Shared Global Area which was why hugpages were invented anyway