Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-08 Thread Huang, Ying
Andrea Arcangeli writes: > Hello, > > On Sun, Nov 05, 2017 at 11:01:05AM +0800, huang ying wrote: >> On Fri, Nov 3, 2017 at 11:00 PM, Zi Yan wrote: >> > On 3 Nov 2017, at 3:52, Huang, Ying wrote: >> > >> >> From: Huang Ying >> >> >> >> If THP migration is enabled, the following situation is pos

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-06 Thread Zi Yan
On 6 Nov 2017, at 15:35, Andrea Arcangeli wrote: > On Mon, Nov 06, 2017 at 10:53:48AM -0500, Zi Yan wrote: >> Thanks for clarifying it. We both agree that !pmd_present(), which means >> PMD migration entry, does not get into userfaultfd_must_wait(), >> then there seems to be no issue with current

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-06 Thread Andrea Arcangeli
On Mon, Nov 06, 2017 at 10:53:48AM -0500, Zi Yan wrote: > Thanks for clarifying it. We both agree that !pmd_present(), which means > PMD migration entry, does not get into userfaultfd_must_wait(), > then there seems to be no issue with current code yet. > > However, the if (!pmd_present(_pmd)) in

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-06 Thread Andrea Arcangeli
Hello, On Sun, Nov 05, 2017 at 11:01:05AM +0800, huang ying wrote: > On Fri, Nov 3, 2017 at 11:00 PM, Zi Yan wrote: > > On 3 Nov 2017, at 3:52, Huang, Ying wrote: > > > >> From: Huang Ying > >> > >> If THP migration is enabled, the following situation is possible, > >> > >> - A THP is mapped at

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-06 Thread Zi Yan
On 4 Nov 2017, at 23:01, huang ying wrote: On Fri, Nov 3, 2017 at 11:00 PM, Zi Yan wrote: On 3 Nov 2017, at 3:52, Huang, Ying wrote: From: Huang Ying If THP migration is enabled, the following situation is possible, - A THP is mapped at source address - Migration is started to move the TH

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-04 Thread huang ying
On Fri, Nov 3, 2017 at 11:00 PM, Zi Yan wrote: > On 3 Nov 2017, at 3:52, Huang, Ying wrote: > >> From: Huang Ying >> >> If THP migration is enabled, the following situation is possible, >> >> - A THP is mapped at source address >> - Migration is started to move the THP to another node >> - Page f

Re: [RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-03 Thread Zi Yan
On 3 Nov 2017, at 3:52, Huang, Ying wrote: > From: Huang Ying > > If THP migration is enabled, the following situation is possible, > > - A THP is mapped at source address > - Migration is started to move the THP to another node > - Page fault occurs > - The PMD (migration entry) is copied to the

[RFC -mm] mm, userfaultfd, THP: Avoid waiting when PMD under THP migration

2017-11-03 Thread Huang, Ying
From: Huang Ying If THP migration is enabled, the following situation is possible, - A THP is mapped at source address - Migration is started to move the THP to another node - Page fault occurs - The PMD (migration entry) is copied to the destination address in mremap That is, it is possible fo