Re: [PATCH v12 3/6] mm, thp: introduce FOLL_SPLIT_PMD

2019-08-09 Thread Song Liu
> On Aug 9, 2019, at 9:35 AM, Oleg Nesterov wrote: > > On 08/08, Song Liu wrote: >> >>> On Aug 8, 2019, at 9:37 AM, Oleg Nesterov wrote: >>> >>> On 08/07, Song Liu wrote: @@ -399,7 +399,7 @@ static struct page *follow_pmd_mask(struct vm_area_struct *vma,

Re: [PATCH v12 3/6] mm, thp: introduce FOLL_SPLIT_PMD

2019-08-09 Thread Oleg Nesterov
On 08/08, Song Liu wrote: > > > On Aug 8, 2019, at 9:37 AM, Oleg Nesterov wrote: > > > > On 08/07, Song Liu wrote: > >> > >> @@ -399,7 +399,7 @@ static struct page *follow_pmd_mask(struct > >> vm_area_struct *vma, > >>spin_unlock(ptl); > >>return follow_page_pte(vma,

Re: [PATCH v12 3/6] mm, thp: introduce FOLL_SPLIT_PMD

2019-08-08 Thread Song Liu
> On Aug 8, 2019, at 9:37 AM, Oleg Nesterov wrote: > > On 08/07, Song Liu wrote: >> >> @@ -399,7 +399,7 @@ static struct page *follow_pmd_mask(struct >> vm_area_struct *vma, >> spin_unlock(ptl); >> return follow_page_pte(vma, address, pmd, flags, >pgmap); >> }

Re: [PATCH v12 3/6] mm, thp: introduce FOLL_SPLIT_PMD

2019-08-08 Thread Oleg Nesterov
On 08/07, Song Liu wrote: > > @@ -399,7 +399,7 @@ static struct page *follow_pmd_mask(struct vm_area_struct > *vma, > spin_unlock(ptl); > return follow_page_pte(vma, address, pmd, flags, >pgmap); > } > - if (flags & FOLL_SPLIT) { > + if (flags &

[PATCH v12 3/6] mm, thp: introduce FOLL_SPLIT_PMD

2019-08-07 Thread Song Liu
This patches introduces a new foll_flag: FOLL_SPLIT_PMD. As the name says FOLL_SPLIT_PMD splits huge pmd for given mm_struct, the underlining huge page stays as-is. FOLL_SPLIT_PMD is useful for cases where we need to use regular pages, but would switch back to huge page and huge pmd on. One of