From: Tiwei Bie <tiwei.bie@intel.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] eal/bsd: don't zero the pages during mmap in contigmem
Date: Mon, 8 May 2017 17:13:34 +0800 [thread overview]
Message-ID: <20170508091334.GB11935@debian> (raw)
In-Reply-To: <20170508085357.GA47408@bricha3-MOBL3.ger.corp.intel.com>
On Mon, May 08, 2017 at 09:53:57AM +0100, Bruce Richardson wrote:
> On Mon, May 08, 2017 at 08:09:16AM +0000, Tiwei Bie wrote:
> > Don't zero the pages during mmap in contigmem. Instead, zero the
> > pages after mmap in primary process. Otherwise, the multi-process
> > support will be broken, as the pages will be zeroed when secondary
> > processes map the memory.
> >
> > Fixes: 82f931805506 ("contigmem: zero all pages during mmap")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> > ---
> I agree there is a problem here, but I'm not sure about the solution to
> it. I still think that the kernel should zero the pages before they get
> given to userspace. Is there any way to keep that working e.g
>
> * have them zeroed on mmap only when they are not already mmaped into
> another process?
> * have them zeroed on init, and again on unmap by the last process to
> have them mapped?
>
I think it's the simplest way to fix it in userspace, so I just did it.
I'd like to fix it in kernel if you also prefer this.
Best regards,
Tiwei Bie
prev parent reply other threads:[~2017-05-08 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 8:09 Tiwei Bie
2017-05-08 8:53 ` Bruce Richardson
2017-05-08 9:13 ` Tiwei Bie [this message]
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=20170508091334.GB11935@debian \
--to=tiwei.bie@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@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).