From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Vlastimil Babka <vbabka@suse.cz>,
"Kirill A. Shutemov" <kirill@shutemov.name>
Cc: akpm@linux-foundation.org, David Rientjes <rientjes@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] mm/thp: Allocate transparent hugepages on local node
Date: Wed, 03 Dec 2014 21:13:06 +0530 [thread overview]
Message-ID: <87fvcwbuyd.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <547DD100.30307@suse.cz>
Vlastimil Babka <vbabka@suse.cz> writes:
> On 12/01/2014 03:06 PM, Aneesh Kumar K.V wrote:
>> "Kirill A. Shutemov" <kirill@shutemov.name> writes:
>>
>>> On Mon, Dec 01, 2014 at 11:16:43AM +0530, Aneesh Kumar K.V wrote:
>>>> This make sure that we try to allocate hugepages from local node if
>>>> allowed by mempolicy. If we can't, we fallback to small page allocation
>>>> based on mempolicy. This is based on the observation that allocating pages
>>>> on local node is more beneficial that allocating hugepages on remote node.
>>>>
........
......
>>>> index e58725aff7e9..fa96af5b31f7 100644
>>>> --- a/mm/mempolicy.c
>>>> +++ b/mm/mempolicy.c
>>>> @@ -2041,6 +2041,46 @@ retry_cpuset:
>>>> return page;
>>>> }
>>>>
>>>> +struct page *alloc_hugepage_vma(gfp_t gfp, struct vm_area_struct *vma,
>>>> + unsigned long addr, int order)
>
> It's somewhat confusing that the name talks about hugepages, yet you
> have to supply the order and gfp. Only the policy handling is tailored
> for hugepages. But maybe it's better than calling the function
> "alloc_pages_vma_local_only_unless_interpolate" :/
>
I did try to do an API that does
struct page *alloc_hugepage_vma(struct vm_area_struct *vma, unsigned long addr)
But that will result in further #ifdef in mm/mempolicy, because we will
then introduce transparent_hugepage_defrag(vma) and HPAGE_PMD_ORDER
there. I was not sure whether we really wanted that.
-aneesh
--
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:[~2014-12-03 15:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 5:46 Aneesh Kumar K.V
2014-12-01 11:33 ` Kirill A. Shutemov
2014-12-01 14:06 ` Aneesh Kumar K.V
2014-12-02 14:47 ` Vlastimil Babka
2014-12-03 15:43 ` Aneesh Kumar K.V [this message]
2015-01-13 2:42 ` Aneesh Kumar K.V
2015-01-13 9:25 ` Vlastimil Babka
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=87fvcwbuyd.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/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