Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Toshi Kani
On 4/21/2016 8:22 PM, Matthew Wilcox wrote: On Thu, Apr 21, 2016 at 07:43:39PM -0400, Toshi Kani wrote: On 4/21/2016 4:21 PM, Mike Kravetz wrote: Might want to keep the future possibility of PUD_SIZE THP in mind? Yes, this is why the func name does not say 'pmd'. It can be extended to

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Toshi Kani
On 4/21/2016 8:22 PM, Matthew Wilcox wrote: On Thu, Apr 21, 2016 at 07:43:39PM -0400, Toshi Kani wrote: On 4/21/2016 4:21 PM, Mike Kravetz wrote: Might want to keep the future possibility of PUD_SIZE THP in mind? Yes, this is why the func name does not say 'pmd'. It can be extended to

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Matthew Wilcox
On Thu, Apr 21, 2016 at 07:43:39PM -0400, Toshi Kani wrote: > On 4/21/2016 4:21 PM, Mike Kravetz wrote: > >Might want to keep the future possibility of PUD_SIZE THP in mind? > > Yes, this is why the func name does not say 'pmd'. It can be extended to > support > PUD_SIZE in future. Sure ... but

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Matthew Wilcox
On Thu, Apr 21, 2016 at 07:43:39PM -0400, Toshi Kani wrote: > On 4/21/2016 4:21 PM, Mike Kravetz wrote: > >Might want to keep the future possibility of PUD_SIZE THP in mind? > > Yes, this is why the func name does not say 'pmd'. It can be extended to > support > PUD_SIZE in future. Sure ... but

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Toshi Kani
On 4/21/2016 4:21 PM, Mike Kravetz wrote: On 04/21/2016 12:06 AM, Matthew Wilcox wrote: On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: How about moving the function (as is) to mm/huge_memory.c, rename it to get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h when

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Toshi Kani
On 4/21/2016 4:21 PM, Mike Kravetz wrote: On 04/21/2016 12:06 AM, Matthew Wilcox wrote: On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: How about moving the function (as is) to mm/huge_memory.c, rename it to get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h when

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Toshi Kani
On 4/21/2016 3:06 AM, Matthew Wilcox wrote: On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: How about moving the function (as is) to mm/huge_memory.c, rename it to get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h when TRANSPARENT_HUGEPAGE is unset? Great idea.

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Toshi Kani
On 4/21/2016 3:06 AM, Matthew Wilcox wrote: On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: How about moving the function (as is) to mm/huge_memory.c, rename it to get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h when TRANSPARENT_HUGEPAGE is unset? Great idea.

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Mike Kravetz
On 04/21/2016 12:06 AM, Matthew Wilcox wrote: > On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: >> How about moving the function (as is) to mm/huge_memory.c, rename it to >> get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h >> when TRANSPARENT_HUGEPAGE is unset? > >

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Mike Kravetz
On 04/21/2016 12:06 AM, Matthew Wilcox wrote: > On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: >> How about moving the function (as is) to mm/huge_memory.c, rename it to >> get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h >> when TRANSPARENT_HUGEPAGE is unset? > >

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Matthew Wilcox
On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: > How about moving the function (as is) to mm/huge_memory.c, rename it to > get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h > when TRANSPARENT_HUGEPAGE is unset? Great idea. Perhaps it should look something like

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-21 Thread Matthew Wilcox
On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote: > How about moving the function (as is) to mm/huge_memory.c, rename it to > get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h > when TRANSPARENT_HUGEPAGE is unset? Great idea. Perhaps it should look something like

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-20 Thread Toshi Kani
On 4/19/2016 2:23 PM, Matthew Wilcox wrote: On Mon, Apr 18, 2016 at 10:26:10PM +0200, Jan Kara wrote: On Fri 15-04-16 22:05:31, Andrew Morton wrote: On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-20 Thread Toshi Kani
On 4/19/2016 2:23 PM, Matthew Wilcox wrote: On Mon, Apr 18, 2016 at 10:26:10PM +0200, Jan Kara wrote: On Fri 15-04-16 22:05:31, Andrew Morton wrote: On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page size. This feature

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-19 Thread Matthew Wilcox
On Mon, Apr 18, 2016 at 10:26:10PM +0200, Jan Kara wrote: > On Fri 15-04-16 22:05:31, Andrew Morton wrote: > > On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: > > > > > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > > > size. This feature relies on

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-19 Thread Matthew Wilcox
On Mon, Apr 18, 2016 at 10:26:10PM +0200, Jan Kara wrote: > On Fri 15-04-16 22:05:31, Andrew Morton wrote: > > On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: > > > > > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > > > size. This feature relies on both mmap virtual

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-18 Thread Jan Kara
On Fri 15-04-16 22:05:31, Andrew Morton wrote: > On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: > > > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > > size. This feature relies on both mmap virtual address and FS > > block (i.e. physical address)

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-18 Thread Jan Kara
On Fri 15-04-16 22:05:31, Andrew Morton wrote: > On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: > > > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > > size. This feature relies on both mmap virtual address and FS > > block (i.e. physical address) to be aligned by the

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-15 Thread Andrew Morton
On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > size. This feature relies on both mmap virtual address and FS > block (i.e. physical address) to be aligned by the pmd page size. > Users can use mkfs

Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-15 Thread Andrew Morton
On Thu, 14 Apr 2016 10:48:29 -0600 Toshi Kani wrote: > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > size. This feature relies on both mmap virtual address and FS > block (i.e. physical address) to be aligned by the pmd page size. > Users can use mkfs options to specify FS

[PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-14 Thread Toshi Kani
When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page size. This feature relies on both mmap virtual address and FS block (i.e. physical address) to be aligned by the pmd page size. Users can use mkfs options to specify FS to align block allocations. However, aligning mmap address

[PATCH v3 0/2] Align mmap address for DAX pmd mappings

2016-04-14 Thread Toshi Kani
When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page size. This feature relies on both mmap virtual address and FS block (i.e. physical address) to be aligned by the pmd page size. Users can use mkfs options to specify FS to align block allocations. However, aligning mmap address