> -----Original Message----- > From: dev [mailto:[email protected]] On Behalf Of Andrew Rybchenko > Sent: Wednesday, July 18, 2018 4:20 PM > To: Burakov, Anatoly <[email protected]> > Cc: [email protected]; Sergio Gonzalez Monroy > <[email protected]> > Subject: [dpdk-dev] Memory allocated using rte_zmalloc() has non-zeros > > Hi Anatoly, > > I'm investigating issue which finally comes to the fact that memory > allocated using > rte_zmalloc() has non zeros. > > If I add memset just after allocation, everything is perfect and works > fine. > > I've found out that memset was removed from rte_zmalloc_socket() some time > ago: > > >>> > commit b78c9175118f7d61022ddc5c62ce54a1bd73cea5 > Author: Sergio Gonzalez Monroy <[email protected]> > Date: Tue Jul 5 12:01:16 2016 +0100 > > mem: do not zero out memory on zmalloc > > Zeroing out memory on rte_zmalloc_socket is not required anymore > since all > allocated memory is already zeroed. > > Signed-off-by: Sergio Gonzalez Monroy > <[email protected]> > <<< > > but may be something has changed now that made above statement false. > > I observe the problem when memory is reallocated. I.e. I configure 7 > queues, start, stop, reconfigure to 3 queues, start. Memory is allocated > on start and freed on stop, since we have less queues on the second start > it is allocated in a different way and reuses previously allocated/freed > memory. > > Do you have any ideas what could be wrong? > Previously, the memory used to be zeroed on free, but if it's non-zero on realloc then it's likely that that has been dropped somewhere along the line.
/Bruce

