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.campb...@citrix.com>
> > ---
> > 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@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to