[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH XEN v8 24/29] tools/libs/call: linux: touch newly allocated pages after madvise lockdown



On Tue, 2016-01-19 at 13:24 +0000, Wei Liu wrote:
> On Fri, Jan 15, 2016 at 01:23:03PM +0000, Ian Campbell wrote:
> > This avoids a potential issue with a fork after allocation but before
> > madvise.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > ---
> > v7: New, replacing "tools/libs/call: linux: avoid forking between mmap
> > ÂÂÂÂand madvise".
> > ---
> > Âtools/libs/call/linux.c | 14 +++++++++++++-
> > Â1 file changed, 13 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/libs/call/linux.c b/tools/libs/call/linux.c
> > index 3641e41..651f380 100644
> > --- a/tools/libs/call/linux.c
> > +++ b/tools/libs/call/linux.c
> 
> I didn't notice you only handled this for Linux until now.
> 
> I think FreeBSD and NetBSD need similar treatment, too? But then current
> BSD* code doesn't even support DONTFORK in madvise.

I think any updates to the *BSD side should come as separate improvements.

If they are necessary at all, the Linux stuff comes from Linux making use
of particular behaviours on mlock()'s memory (specifically, IIRC, doing
things such as THP and NUMA balancing which can cause page faults on the
mlock'd pages despite them being locked) which are (possibly) allowed by
POSIX, but *BSD may not take the same interpretation.

> Adding Roger for more input.
> 
> The changes in this patch look fine to me.

May I take that as an Ack?


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.