Re: [PATCH v10 3/4] mm, thp: introduce FOLL_SPLIT_PMD

2019-08-01 Thread Oleg Nesterov
On 07/31, Song Liu wrote: > > > On Jul 31, 2019, at 8:18 AM, Oleg Nesterov wrote: > > > > Now, I don't understand why do we need pmd_trans_unstable() after > > split_huge_pmd(huge-zero-pmd), but whatever reason we have, why can't we > > unify both cases? > > > > IOW, could you explain why the

Re: [PATCH v10 3/4] mm, thp: introduce FOLL_SPLIT_PMD

2019-07-31 Thread Song Liu
> On Jul 31, 2019, at 8:18 AM, Oleg Nesterov wrote: > > On 07/30, Song Liu wrote: >> >> >>> On Jul 30, 2019, at 9:11 AM, Oleg Nesterov wrote: >>> >>> So after the next patch we have a single user of FOLL_SPLIT_PMD (uprobes) >>> and a single user of FOLL_SPLIT:

Re: [PATCH v10 3/4] mm, thp: introduce FOLL_SPLIT_PMD

2019-07-31 Thread Oleg Nesterov
On 07/30, Song Liu wrote: > > > > On Jul 30, 2019, at 9:11 AM, Oleg Nesterov wrote: > > > > So after the next patch we have a single user of FOLL_SPLIT_PMD (uprobes) > > and a single user of FOLL_SPLIT: arch/s390/mm/gmap.c:thp_split_mm(). > > > > Hmm. > > I think this is what we want. :) We? I

Re: [PATCH v10 3/4] mm, thp: introduce FOLL_SPLIT_PMD

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 9:11 AM, Oleg Nesterov wrote: > > I don't understand this code, so I can't review, but. > > On 07/29, Song Liu wrote: >> >> 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

Re: [PATCH v10 3/4] mm, thp: introduce FOLL_SPLIT_PMD

2019-07-30 Thread Oleg Nesterov
I don't understand this code, so I can't review, but. On 07/29, Song Liu wrote: > > 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

[PATCH v10 3/4] mm, thp: introduce FOLL_SPLIT_PMD

2019-07-29 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