From: Andi Kleen <andi@firstfloor.org>
To: Mel Gorman <mel@csn.ul.ie>
Cc: wli@holomorphy.com, agl@us.ibm.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Reserve huge pages for reliable MAP_PRIVATE hugetlbfs mappings
Date: Wed, 23 Apr 2008 15:55:10 +0200 [thread overview]
Message-ID: <87hcdsznep.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080421183621.GA13100@csn.ul.ie> (Mel Gorman's message of "Mon, 21 Apr 2008 19:36:22 +0100")
Mel Gorman <mel@csn.ul.ie> writes:
> MAP_SHARED mappings on hugetlbfs reserve huge pages at mmap() time. This is
> so that all future faults will be guaranteed to succeed. Applications are not
> expected to use mlock() as this can result in poor NUMA placement.
>
> MAP_PRIVATE mappings do not reserve pages. This can result in an application
> being SIGKILLed later if a large page is not available at fault time. This
> makes huge pages usage very ill-advised in some cases as the unexpected
> application failure is intolerable. Forcing potential poor placement with
> mlock() is not a great solution either.
>
> This patch reserves huge pages at mmap() time for MAP_PRIVATE mappings similar
> to what happens for MAP_SHARED mappings.
This will break all applications that mmap more hugetlbpages than they
actually use. How do you know these don't exist?
> Opinions?
Seems like a risky interface change to me.
-Andi
WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <andi@firstfloor.org>
To: Mel Gorman <mel@csn.ul.ie>
Cc: wli@holomorphy.com, agl@us.ibm.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Reserve huge pages for reliable MAP_PRIVATE hugetlbfs mappings
Date: Wed, 23 Apr 2008 15:55:10 +0200 [thread overview]
Message-ID: <87hcdsznep.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080421183621.GA13100@csn.ul.ie> (Mel Gorman's message of "Mon, 21 Apr 2008 19:36:22 +0100")
Mel Gorman <mel@csn.ul.ie> writes:
> MAP_SHARED mappings on hugetlbfs reserve huge pages at mmap() time. This is
> so that all future faults will be guaranteed to succeed. Applications are not
> expected to use mlock() as this can result in poor NUMA placement.
>
> MAP_PRIVATE mappings do not reserve pages. This can result in an application
> being SIGKILLed later if a large page is not available at fault time. This
> makes huge pages usage very ill-advised in some cases as the unexpected
> application failure is intolerable. Forcing potential poor placement with
> mlock() is not a great solution either.
>
> This patch reserves huge pages at mmap() time for MAP_PRIVATE mappings similar
> to what happens for MAP_SHARED mappings.
This will break all applications that mmap more hugetlbpages than they
actually use. How do you know these don't exist?
> Opinions?
Seems like a risky interface change to me.
-Andi
--
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>
next prev parent reply other threads:[~2008-04-23 14:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 18:36 [RFC] Reserve huge pages for reliable MAP_PRIVATE hugetlbfs mappings Mel Gorman
2008-04-21 18:36 ` Mel Gorman
2008-04-21 19:05 ` Adam Litke
2008-04-21 19:05 ` Adam Litke
2008-04-21 19:19 ` Mel Gorman
2008-04-21 19:19 ` Mel Gorman
2008-04-23 13:55 ` Andi Kleen [this message]
2008-04-23 13:55 ` Andi Kleen
2008-04-23 15:14 ` Mel Gorman
2008-04-23 15:14 ` Mel Gorman
2008-04-23 15:43 ` Andi Kleen
2008-04-23 15:43 ` Andi Kleen
2008-04-23 16:01 ` Mel Gorman
2008-04-23 16:01 ` Mel Gorman
2008-04-24 8:47 ` Andy Whitcroft
2008-04-24 8:47 ` Andy Whitcroft
2008-05-04 5:29 ` dean gaudet
2008-05-04 5:29 ` dean gaudet
2008-04-25 14:28 ` Andy Whitcroft
2008-04-25 14:28 ` Andy Whitcroft
2008-04-25 15:19 ` Mel Gorman
2008-04-25 15:19 ` Mel Gorman
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=87hcdsznep.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=agl@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=wli@holomorphy.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.