From: Andrew Hastings <abh@cray.com>
To: linux-mm@kvack.org
Cc: Mel Gorman <mel@csn.ul.ie>
Subject: Re: [PATCH 0/3] Guarantee faults for processes that call mmap(MAP_PRIVATE) on hugetlbfs v2
Date: Tue, 13 May 2008 13:12:00 -0500 [thread overview]
Message-ID: <4829D9F0.70109@cray.com> (raw)
In-Reply-To: <20080508111408.GB30870@shadowen.org>
Andy Whitcroft wrote:
> Without patch 3 the parent is still vunerable during the period the
> child exists. Even if that child does nothing with the pages not even
> referencing them, and then execs immediatly. As soon as we fork any
> reference from the parent will trigger a COW, at which point there may
> be no pages available and the parent will have to be killed. That is
> regardless of the fact the child is not going to reference the page and
> leave the address space shortly. With patch 3 on COW if we find no memory
> available the page may be stolen for the parent saving it, and the _risk_
> of reference death moves to the child; the child is killed only should it
> then re-reference the page.
>
> Without patch 3 a both the parent and child are immediatly vunerable on
> fork() until the child leaves the address space. With patch 3 only the
> child is vunerable. The main scenario where mapper protection is useful
> is for main payload applications which fork helpers. The parent by
> definition is using the mapping heavily whereas we do not expect the
> children to even be aware of it. As the child will not touch the
> mapping both parent and child should be safe even if we do have to steal
> to save the parent.
I agree, it's important to close this window for the parent. This will
be helpful for our customers as we move towards wider use of libhugetlbfs.
Thanks, Mel!
-Andrew Hastings
Cray Inc.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-05-13 18:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 19:38 [PATCH 0/3] Guarantee faults for processes that call mmap(MAP_PRIVATE) on hugetlbfs v2 Mel Gorman
2008-05-07 19:38 ` [PATCH 1/3] Move hugetlb_acct_memory() Mel Gorman
2008-05-07 19:39 ` [PATCH 2/3] Reserve huge pages for reliable MAP_PRIVATE hugetlbfs mappings until fork() Mel Gorman
2008-05-14 20:55 ` Adam Litke
2008-05-16 12:11 ` Mel Gorman
2008-05-07 19:39 ` [PATCH 3/3] Guarantee that COW faults for a process that called mmap(MAP_PRIVATE) on hugetlbfs will succeed Mel Gorman
2008-05-14 20:55 ` Adam Litke
2008-05-16 12:15 ` Mel Gorman
2008-05-08 1:48 ` [PATCH 0/3] Guarantee faults for processes that call mmap(MAP_PRIVATE) on hugetlbfs v2 David Gibson
2008-05-08 6:56 ` Mel Gorman
2008-05-08 11:14 ` Andy Whitcroft
2008-05-09 0:02 ` David Gibson
2008-05-09 13:30 ` Mel Gorman
2008-05-13 18:12 ` Andrew Hastings [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=4829D9F0.70109@cray.com \
--to=abh@cray.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/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).