From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] contigmem: zero all pages during mmap Date: Mon, 22 Aug 2016 22:58:46 +0200 Message-ID: <4904186.gj4j9rRC36@xps13> References: <20160816224646.1982.50720.stgit@jrharri1-mac> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, stable@dpdk.org To: Jim Harris Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id A8BAE388F for ; Mon, 22 Aug 2016 22:58:48 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id o80so164281259wme.1 for ; Mon, 22 Aug 2016 13:58:48 -0700 (PDT) In-Reply-To: <20160816224646.1982.50720.stgit@jrharri1-mac> 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" 2016-08-16 15:46, Jim Harris: > On Linux, all huge pages are zeroed by the kernel before > first access by the DPDK application. But on FreeBSD, > the contigmem driver would only zero the contiguous > memory regions during initial driver load. > > DPDK commit b78c91751 eliminated the explicit memset() > operation for rte_zmalloc(), which was OK on Linux > because the kernel zeroes the pages during app start, > but this broke FreeBSD. So this patch explicitly > zeroes the pages before they are mmap'd, to ensure > equivalent behavior to Linux Added precision that the bug is seen "when restarting app". > Fixes: b78c9175118f ("mem: do not zero out memory on zmalloc") > > Reported-by: Daniel Verkamp > Tested-by: Daniel Verkamp > Acked-by: Sergio Gonzalez Monroy > Signed-off-by: Jim Harris Applied, thanks CC stable@, please pick this important fix in 16.07.