Linux Container Development
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [RFC] checkpoint: un-blacklist VM_NORESERVE
Date: Fri, 18 Jun 2010 11:33:35 -0400	[thread overview]
Message-ID: <4C1B91CF.6070701@cs.columbia.edu> (raw)
In-Reply-To: <1276808838.6401.6.camel@localhost>


On 06/17/2010 05:07 PM, Nathan Lynch wrote:
> While a region mapped with MAP_NORESERVE may segv on a write in
> low-memory conditions, reading it (as we do during checkpoint) is
> fine.  Remove the VM_NORESERVE flag from CKPT_VMA_NOT_SUPPORTED.
> 
> ---
> 
> Oren, what do you think about this?  I've tested this lightly with no
> apparent problems; is there some reason I'm missing to not support
> MAP_NORESERVE regions?

Sounds reasonable. I originally left it out because I wasn't sure.
In particular, my concern was whether a user may cause troubles by
specifying this flag. Now I looked deeper, and I think it's safe.

Note, however, it isn't enough to allow the flag, we also need to
modify calc_map_flags_bits() to reintroduce MAP_NORESERVE for the
flags argument to do_mmap_pgoff(). Otherwise it won't be restored
at restart...

No need to repost the patch. I'll do it.

Oren.

> 
>  include/linux/checkpoint.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h
> index 84bb7a9..f3e0d11 100644
> --- a/include/linux/checkpoint.h
> +++ b/include/linux/checkpoint.h
> @@ -301,7 +301,7 @@ extern int restore_memory_contents(struct ckpt_ctx *ctx, struct inode *inode);
>  
>  #define CKPT_VMA_NOT_SUPPORTED						\
>  	(VM_IO | VM_HUGETLB | VM_NONLINEAR | VM_PFNMAP |		\
> -	 VM_RESERVED | VM_NORESERVE | VM_HUGETLB | VM_NONLINEAR |	\
> +	 VM_RESERVED | VM_HUGETLB | VM_NONLINEAR |	\
>  	 VM_MAPPED_COPY | VM_INSERTPAGE | VM_MIXEDMAP | VM_SAO)
>  
>  /* signals */

  reply	other threads:[~2010-06-18 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 21:07 [RFC] checkpoint: un-blacklist VM_NORESERVE Nathan Lynch
2010-06-18 15:33 ` Oren Laadan [this message]
2010-06-18 21:49 ` [PATCH] c/r: Un-blacklist VM_NORESERVE and VM_LOCKED Oren Laadan
     [not found]   ` <1276897775-4911-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-06-19  2:49     ` Dan Smith

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=4C1B91CF.6070701@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.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