lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4] mm/thp: Allocate transparent hugepages on local node
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.

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

>
> 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? ;)

--
Kirill A. Shutemov


\
 
 \ /
  Last update: 2015-01-26 13:21    [W:0.086 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site