[dpdk-dev] [PATCH v2] contigmem: zero all pages during mmap

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Aug 22 22:58:46 CEST 2016


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 <daniel.verkamp at intel.com>
> Tested-by: Daniel Verkamp <daniel.verkamp at intel.com>
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com>
> Signed-off-by: Jim Harris <james.r.harris at intel.com>

Applied, thanks

CC stable@, please pick this important fix in 16.07.


More information about the dev mailing list