From: Adam Litke <agl@us.ibm.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, apw@shadowen.org
Subject: Re: [PATCH 1/2] [PATCH] Fix a hugepage reservation check for MAP_SHARED
Date: Thu, 10 Jul 2008 14:01:59 -0500 [thread overview]
Message-ID: <1215716519.14825.112.camel@localhost.localdomain> (raw)
In-Reply-To: <20080710173021.16433.90661.sendpatchset@skynet.skynet.ie>
On Thu, 2008-07-10 at 18:30 +0100, Mel Gorman wrote:
> When removing a huge page from the hugepage pool for a fault the system
> checks to see if the mapping requires additional pages to be reserved, and
> if it does whether there are any unreserved pages remaining. If not, the
> allocation fails without even attempting to get a page. In order to determine
> whether to apply this check we call vma_has_private_reserves() which tells us
> if this vma is MAP_PRIVATE and is the owner. This incorrectly triggers the
> remaining reservation test for MAP_SHARED mappings which prevents allocation
> of the final page in the pool even though it is reserved for this mapping.
>
> In reality we only want to check this for MAP_PRIVATE mappings where the
> process is not the original mapper. Replace vma_has_private_reserves() with
> vma_has_reserves() which indicates whether further reserves are required,
> and update the caller.
>
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Adam Litke <agl@us.ibm.com>
Tested and confirmed.
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center
WARNING: multiple messages have this Message-ID (diff)
From: Adam Litke <agl@us.ibm.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, apw@shadowen.org
Subject: Re: [PATCH 1/2] [PATCH] Fix a hugepage reservation check for MAP_SHARED
Date: Thu, 10 Jul 2008 14:01:59 -0500 [thread overview]
Message-ID: <1215716519.14825.112.camel@localhost.localdomain> (raw)
In-Reply-To: <20080710173021.16433.90661.sendpatchset@skynet.skynet.ie>
On Thu, 2008-07-10 at 18:30 +0100, Mel Gorman wrote:
> When removing a huge page from the hugepage pool for a fault the system
> checks to see if the mapping requires additional pages to be reserved, and
> if it does whether there are any unreserved pages remaining. If not, the
> allocation fails without even attempting to get a page. In order to determine
> whether to apply this check we call vma_has_private_reserves() which tells us
> if this vma is MAP_PRIVATE and is the owner. This incorrectly triggers the
> remaining reservation test for MAP_SHARED mappings which prevents allocation
> of the final page in the pool even though it is reserved for this mapping.
>
> In reality we only want to check this for MAP_PRIVATE mappings where the
> process is not the original mapper. Replace vma_has_private_reserves() with
> vma_has_reserves() which indicates whether further reserves are required,
> and update the caller.
>
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Adam Litke <agl@us.ibm.com>
Tested and confirmed.
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center
--
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-07-10 19:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 17:30 [PATCH 0/2] Fix two bugs in hugetlbfs MAP_PRIVATE page reservation Mel Gorman
2008-07-10 17:30 ` Mel Gorman
2008-07-10 17:30 ` [PATCH 1/2] [PATCH] Fix a hugepage reservation check for MAP_SHARED Mel Gorman
2008-07-10 17:30 ` Mel Gorman
2008-07-10 19:01 ` Adam Litke [this message]
2008-07-10 19:01 ` Adam Litke
2008-07-11 8:16 ` Andy Whitcroft
2008-07-11 8:16 ` Andy Whitcroft
2008-07-10 17:30 ` [PATCH 2/2] [PATCH] Align faulting address to a hugepage boundary before unmapping Mel Gorman
2008-07-10 17:30 ` Mel Gorman
2008-07-10 18:02 ` Adam Litke
2008-07-10 18:02 ` Adam Litke
2008-07-11 8:17 ` Andy Whitcroft
2008-07-11 8:17 ` Andy Whitcroft
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=1215716519.14825.112.camel@localhost.localdomain \
--to=agl@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.