linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	David Rientjes <rientjes@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node
Date: Mon, 26 Jan 2015 13:40:31 +0100	[thread overview]
Message-ID: <54C635BF.6010906@suse.cz> (raw)
In-Reply-To: <20150126121309.GD25833@node.dhcp.inet.fi>

On 01/26/2015 01:13 PM, Kirill A. Shutemov wrote:
> On Mon, Jan 26, 2015 at 12:41:55PM +0100, Vlastimil Babka wrote:
>> On 01/21/2015 01:48 AM, Andrew Morton wrote:
>> > On Tue, 20 Jan 2015 17:04:31 +0530 "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
>> >> + * Should be called with the mm_sem of the vma hold.
>> > 
>> > That's a pretty cruddy sentence, isn't it?  Copied from
>> > alloc_pages_vma().  "vma->vm_mm->mmap_sem" would be better.
>> > 
>> > And it should tell us whether mmap_sem required a down_read or a
>> > down_write.  What purpose is it serving?
>> 
>> This is already said for mmap_sem further above this comment line, which
>> should be just deleted (and from alloc_hugepage_vma comment too).
>> 
>> >> + *
>> >> + */
>> >> +struct page *alloc_hugepage_vma(gfp_t gfp, struct vm_area_struct *vma,
>> >> +				unsigned long addr, int order)
>> > 
>> > This pointlessly bloats the kernel if CONFIG_TRANSPARENT_HUGEPAGE=n?
>> > 
>> > 
>> > 
>> > --- a/mm/mempolicy.c~mm-thp-allocate-transparent-hugepages-on-local-node-fix
>> > +++ a/mm/mempolicy.c
>> 
>> How about this cleanup on top? I'm not fully decided on the GFP_TRANSHUGE test.
>> This is potentially false positive, although I doubt anything else uses the same
>> gfp mask bits.
> 
> This info on gfp mask should be in commit message.

Right. Wanted to get some consensus first.

> And what about WARN_ON_ONCE() if we the matching bits with
> !TRANSPARENT_HUGEPAGE?

Hmm, can't say I like that, but could work.

>> 
>> Should "hugepage" be extra bool parameter instead? Should I #ifdef the parameter
>> only for CONFIG_TRANSPARENT_HUGEPAGE, or is it not worth the ugliness?
> 
> Do we have spare gfp bit? ;)

Seems we have defined 24 out of 32. Not too much to spare, and the use case here
is very narrow.

--
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>

  reply	other threads:[~2015-01-26 12:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 11:34 Aneesh Kumar K.V
2015-01-21  0:48 ` Andrew Morton
2015-01-26 11:41   ` Vlastimil Babka
2015-01-26 12:13     ` Kirill A. Shutemov
2015-01-26 12:40       ` Vlastimil Babka [this message]
2015-01-26 14:37     ` Aneesh Kumar K.V
2015-01-30  7:56       ` 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=54C635BF.6010906@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox