numam-dpdk/lib/librte_eal/bsdapp/contigmem
Jim Harris 82f9318055 contigmem: zero all pages during mmap
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 when restarting app.
So this patch explicitly zeroes the pages before they are mmap'd,
to ensure equivalent behavior to Linux.

Fixes: b78c917511 ("mem: do not zero out memory on zmalloc")

Reported-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Tested-by: Daniel Verkamp <daniel.verkamp@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-08-22 22:59:05 +02:00
..
BSDmakefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00
contigmem.c contigmem: zero all pages during mmap 2016-08-22 22:59:05 +02:00
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00