Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-04 Thread Toshi Kani
On Thu, 2015-12-03 at 15:43 -0800, Dan Williams wrote: > On Wed, Dec 2, 2015 at 1:55 PM, Toshi Kani wrote: > > On Wed, 2015-12-02 at 12:54 -0800, Dan Williams wrote: > > > On Wed, Dec 2, 2015 at 1:37 PM, Toshi Kani > > > wrote: > > > > On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: > > >

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-03 Thread Dan Williams
On Wed, Dec 2, 2015 at 1:55 PM, Toshi Kani wrote: > On Wed, 2015-12-02 at 12:54 -0800, Dan Williams wrote: >> On Wed, Dec 2, 2015 at 1:37 PM, Toshi Kani wrote: >> > On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: >> [..] >> > > The whole point of __get_user_page_fast() is to avoid the over

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 4:21 PM, Toshi Kani wrote: > On Wed, 2015-12-02 at 10:43 -0700, Toshi Kani wrote: >> On Tue, 2015-12-01 at 19:45 -0800, Dan Williams wrote: >> > On Tue, Dec 1, 2015 at 6:19 PM, Toshi Kani wrote: >> > > On Mon, 2015-11-30 at 14:08 -0800, Dan Williams wrote: > : >> > > > >>

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Wed, 2015-12-02 at 10:43 -0700, Toshi Kani wrote: > On Tue, 2015-12-01 at 19:45 -0800, Dan Williams wrote: > > On Tue, Dec 1, 2015 at 6:19 PM, Toshi Kani wrote: > > > On Mon, 2015-11-30 at 14:08 -0800, Dan Williams wrote: : > > > > > > > > Hey Toshi, > > > > > > > > I ended up fixing this di

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dave Hansen
On 12/02/2015 02:03 PM, Dan Williams wrote: >>> >> Is pfn_valid() a reliable check? It seems to be based on a max_pfn >>> >> per node... what happens when pmem is located below that point. I >>> >> haven't been able to convince myself that we won't get false >>> >> positives, but maybe I'm missin

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 2:00 PM, Dave Hansen wrote: > On 12/02/2015 12:54 PM, Dan Williams wrote: >> On Wed, Dec 2, 2015 at 1:37 PM, Toshi Kani wrote: >>> > On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: >> [..] >> The whole point of __get_user_page_fast() is to avoid the overhead of

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dave Hansen
On 12/02/2015 12:54 PM, Dan Williams wrote: > On Wed, Dec 2, 2015 at 1:37 PM, Toshi Kani wrote: >> > On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: > [..] >>> >> The whole point of __get_user_page_fast() is to avoid the overhead of >>> >> taking the mm semaphore to access the vma. _PAGE_S

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Wed, 2015-12-02 at 12:54 -0800, Dan Williams wrote: > On Wed, Dec 2, 2015 at 1:37 PM, Toshi Kani wrote: > > On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: > [..] > > > The whole point of __get_user_page_fast() is to avoid the overhead of > > > taking the mm semaphore to access the vma.

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 1:37 PM, Toshi Kani wrote: > On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: [..] >> The whole point of __get_user_page_fast() is to avoid the overhead of >> taking the mm semaphore to access the vma. _PAGE_SPECIAL simply tells >> __get_user_pages_fast that it needs

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Wed, 2015-12-02 at 11:57 -0800, Dan Williams wrote: > On Wed, Dec 2, 2015 at 12:12 PM, Toshi Kani wrote: > > On Wed, 2015-12-02 at 13:02 -0700, Toshi Kani wrote: > > > On Wed, 2015-12-02 at 11:00 -0800, Dan Williams wrote: > > > > On Wed, Dec 2, 2015 at 11:26 AM, Toshi Kani wrote: > > > > > On

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 12:12 PM, Toshi Kani wrote: > On Wed, 2015-12-02 at 13:02 -0700, Toshi Kani wrote: >> On Wed, 2015-12-02 at 11:00 -0800, Dan Williams wrote: >> > On Wed, Dec 2, 2015 at 11:26 AM, Toshi Kani wrote: >> > > On Wed, 2015-12-02 at 10:06 -0800, Dan Williams wrote: >> > > > On Wed

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Wed, 2015-12-02 at 13:02 -0700, Toshi Kani wrote: > On Wed, 2015-12-02 at 11:00 -0800, Dan Williams wrote: > > On Wed, Dec 2, 2015 at 11:26 AM, Toshi Kani wrote: > > > On Wed, 2015-12-02 at 10:06 -0800, Dan Williams wrote: > > > > On Wed, Dec 2, 2015 at 9:01 AM, Dan Williams > > > > wrote: > >

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Wed, 2015-12-02 at 11:00 -0800, Dan Williams wrote: > On Wed, Dec 2, 2015 at 11:26 AM, Toshi Kani wrote: > > On Wed, 2015-12-02 at 10:06 -0800, Dan Williams wrote: > > > On Wed, Dec 2, 2015 at 9:01 AM, Dan Williams > > > wrote: > > > > On Wed, Dec 2, 2015 at 9:43 AM, Toshi Kani wrote: > > > >

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 11:26 AM, Toshi Kani wrote: > On Wed, 2015-12-02 at 10:06 -0800, Dan Williams wrote: >> On Wed, Dec 2, 2015 at 9:01 AM, Dan Williams >> wrote: >> > On Wed, Dec 2, 2015 at 9:43 AM, Toshi Kani wrote: >> > > Oh, I see. I will setup the memmap array and run the tests again.

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Wed, 2015-12-02 at 10:06 -0800, Dan Williams wrote: > On Wed, Dec 2, 2015 at 9:01 AM, Dan Williams wrote: > > On Wed, Dec 2, 2015 at 9:43 AM, Toshi Kani wrote: > > > Oh, I see. I will setup the memmap array and run the tests again. > > > > > > But, why does the PMD mapping depend on the memm

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 9:01 AM, Dan Williams wrote: > On Wed, Dec 2, 2015 at 9:43 AM, Toshi Kani wrote: >> Oh, I see. I will setup the memmap array and run the tests again. >> >> But, why does the PMD mapping depend on the memmap array? We have observed >> major performance improvement with PMD

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Dan Williams
On Wed, Dec 2, 2015 at 9:43 AM, Toshi Kani wrote: > Oh, I see. I will setup the memmap array and run the tests again. > > But, why does the PMD mapping depend on the memmap array? We have observed > major performance improvement with PMD. This feature should always be enabled > with DAX regardl

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-02 Thread Toshi Kani
On Tue, 2015-12-01 at 19:45 -0800, Dan Williams wrote: > On Tue, Dec 1, 2015 at 6:19 PM, Toshi Kani wrote: > > On Mon, 2015-11-30 at 14:08 -0800, Dan Williams wrote: > > > On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: > > > > The following oops was observed when mmap() with MAP_POPULATE > >

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-01 Thread Dan Williams
On Tue, Dec 1, 2015 at 6:19 PM, Toshi Kani wrote: > On Mon, 2015-11-30 at 14:08 -0800, Dan Williams wrote: >> On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: >> > The following oops was observed when mmap() with MAP_POPULATE >> > pre-faulted pmd mappings of a DAX file. follow_trans_huge_pmd(

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-12-01 Thread Toshi Kani
On Mon, 2015-11-30 at 14:08 -0800, Dan Williams wrote: > On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: > > The following oops was observed when mmap() with MAP_POPULATE > > pre-faulted pmd mappings of a DAX file. follow_trans_huge_pmd() > > expects that a target address has a struct page. >

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-11-30 Thread Dan Williams
On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: > The following oops was observed when mmap() with MAP_POPULATE > pre-faulted pmd mappings of a DAX file. follow_trans_huge_pmd() > expects that a target address has a struct page. > > BUG: unable to handle kernel paging request at ea00122

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-11-23 Thread Toshi Kani
On Mon, 2015-11-23 at 12:53 -0800, Dan Williams wrote: > On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: > > The following oops was observed when mmap() with MAP_POPULATE > > pre-faulted pmd mappings of a DAX file. follow_trans_huge_pmd() > > expects that a target address has a struct page. >

Re: [PATCH] mm: Fix mmap MAP_POPULATE for DAX pmd mapping

2015-11-23 Thread Dan Williams
On Mon, Nov 23, 2015 at 12:04 PM, Toshi Kani wrote: > The following oops was observed when mmap() with MAP_POPULATE > pre-faulted pmd mappings of a DAX file. follow_trans_huge_pmd() > expects that a target address has a struct page. > > BUG: unable to handle kernel paging request at ea00122