DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Memory allocated using rte_zmalloc() has non-zeros
Date: Wed, 18 Jul 2018 16:06:45 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B072665226@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <8bc76811-ac29-d7f2-e4c3-12b50fd44dba@solarflare.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andrew Rybchenko
> Sent: Wednesday, July 18, 2018 4:20 PM
> To: Burakov, Anatoly <anatoly.burakov@intel.com>
> Cc: dev@dpdk.org; Sergio Gonzalez Monroy
> <sergio.gonzalez.monroy@intel.com>
> 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 <sergio.gonzalez.monroy@intel.com>
> 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
> <sergio.gonzalez.monroy@intel.com>
> <<<
> 
> 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

  reply	other threads:[~2018-07-18 16:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 15:20 Andrew Rybchenko
2018-07-18 16:06 ` Richardson, Bruce [this message]
2018-07-18 17:18 ` Burakov, Anatoly
2018-07-18 19:52   ` Andrew Rybchenko
2018-07-18 20:58     ` Stephen Hemminger
2018-07-19  9:01       ` Burakov, Anatoly
2018-07-19  9:48         ` Burakov, Anatoly
2018-07-19 16:44           ` Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59AF69C657FD0841A61C55336867B5B072665226@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).