[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1211982764.12036.58.camel@localhost.localdomain>
Date: Wed, 28 May 2008 08:52:44 -0500
From: Adam Litke <agl@...ibm.com>
To: Mel Gorman <mel@....ul.ie>
Cc: akpm@...ux-foundation.org, abh@...y.com, dean@...tic.org,
linux-kernel@...r.kernel.org, wli@...omorphy.com, dwg@....ibm.com,
linux-mm@...ck.org, andi@...stfloor.org, kenchen@...gle.com,
apw@...dowen.org
Subject: Re: [PATCH 2/3] Reserve huge pages for reliable MAP_PRIVATE
hugetlbfs mappings until fork()
On Tue, 2008-05-27 at 19:51 +0100, Mel Gorman wrote:
> This patch reserves huge pages at mmap() time for MAP_PRIVATE mappings in a
> similar manner to the reservations taken for MAP_SHARED mappings. The reserve count is
> accounted both globally and on a per-VMA basis for private mappings. This
> guarantees that a process that successfully calls mmap() will successfully
> fault all pages in the future unless fork() is called.
>
> The characteristics of private mappings of hugetlbfs files behaviour after
> this patch are;
>
> 1. The process calling mmap() is guaranteed to succeed all future faults until
> it forks().
> 2. On fork(), the parent may die due to SIGKILL on writes to the private
> mapping if enough pages are not available for the COW. For reasonably
> reliable behaviour in the face of a small huge page pool, children of
> hugepage-aware processes should not reference the mappings; such as
> might occur when fork()ing to exec().
> 3. On fork(), the child VMAs inherit no reserves. Reads on pages already
> faulted by the parent will succeed. Successful writes will depend on enough
> huge pages being free in the pool.
> 4. Quotas of the hugetlbfs mount are checked at reserve time for the mapper
> and at fault time otherwise.
>
> Before this patch, all reads or writes in the child potentially needs page
> allocations that can later lead to the death of the parent. This applies
> to reads and writes of uninstantiated pages as well as COW. After the
> patch it is only a write to an instantiated page that causes problems.
>
> Signed-off-by: Mel Gorman <mel@....ul.ie>
Acked-by: Adam Litke <agl@...ibm.com>
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists