Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-29 Thread Vlastimil Babka
On 01/26/2015 03:37 PM, Aneesh Kumar K.V wrote: > Vlastimil Babka writes: > >> On 01/21/2015 01:48 AM, Andrew Morton wrote: >>> On Tue, 20 Jan 2015 17:04:31 +0530 "Aneesh Kumar K.V" >>> wrote: + * Should be called with the mm_sem of the vma hold. >>> >>> That's a pretty cruddy sentence,

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-29 Thread Vlastimil Babka
On 01/26/2015 03:37 PM, Aneesh Kumar K.V wrote: Vlastimil Babka vba...@suse.cz writes: On 01/21/2015 01:48 AM, Andrew Morton wrote: On Tue, 20 Jan 2015 17:04:31 +0530 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: + * Should be called with the mm_sem of the vma hold. That's a

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Aneesh Kumar K.V
Vlastimil Babka writes: > On 01/21/2015 01:48 AM, Andrew Morton wrote: >> On Tue, 20 Jan 2015 17:04:31 +0530 "Aneesh Kumar K.V" >> 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().

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Vlastimil Babka
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" >> > wrote: >> >> + * Should be called with the mm_sem of the vma hold.

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Kirill A. Shutemov
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" > > wrote: > >> + * Should be called with the mm_sem of the vma hold. > > > > That's a pretty cruddy sentence, isn't it?

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Vlastimil Babka
On 01/21/2015 01:48 AM, Andrew Morton wrote: > On Tue, 20 Jan 2015 17:04:31 +0530 "Aneesh Kumar K.V" > 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. > >

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Vlastimil Babka
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.ku...@linux.vnet.ibm.com wrote: + * Should be called with the mm_sem

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Aneesh Kumar K.V
Vlastimil Babka vba...@suse.cz writes: On 01/21/2015 01:48 AM, Andrew Morton wrote: On Tue, 20 Jan 2015 17:04:31 +0530 Aneesh Kumar K.V aneesh.ku...@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

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Vlastimil Babka
On 01/21/2015 01:48 AM, Andrew Morton wrote: On Tue, 20 Jan 2015 17:04:31 +0530 Aneesh Kumar K.V aneesh.ku...@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

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-26 Thread Kirill A. Shutemov
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.ku...@linux.vnet.ibm.com wrote: + * Should be called with the mm_sem of the vma hold. That's a pretty cruddy

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-20 Thread Andrew Morton
On Tue, 20 Jan 2015 17:04:31 +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

[PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-20 Thread Aneesh Kumar K.V
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 than allocating hugepages on remote node. With

[PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-20 Thread Aneesh Kumar K.V
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 than allocating hugepages on remote node. With

Re: [PATCH V4] mm/thp: Allocate transparent hugepages on local node

2015-01-20 Thread Andrew Morton
On Tue, 20 Jan 2015 17:04:31 +0530 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com 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