Re: [v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count

2021-04-15 Thread Zi Yan
On 15 Apr 2021, at 2:45, Huang, Ying wrote: > "Zi Yan" writes: > >> On 13 Apr 2021, at 23:00, Huang, Ying wrote: >> >>> Yang Shi writes: >>> The generic migration path will check refcount, so no need check refcount here. But the old code actually prevents from migrating shared

Re: [v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count

2021-04-15 Thread Huang, Ying
"Zi Yan" writes: > On 13 Apr 2021, at 23:00, Huang, Ying wrote: > >> Yang Shi writes: >> >>> The generic migration path will check refcount, so no need check refcount >>> here. >>> But the old code actually prevents from migrating shared THP (mapped by >>> multiple >>> processes), so bail out

Re: [v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count

2021-04-14 Thread Yang Shi
On Tue, Apr 13, 2021 at 8:00 PM Huang, Ying wrote: > > Yang Shi writes: > > > The generic migration path will check refcount, so no need check refcount > > here. > > But the old code actually prevents from migrating shared THP (mapped by > > multiple > > processes), so bail out early if

Re: [v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count

2021-04-14 Thread Zi Yan
On 13 Apr 2021, at 23:00, Huang, Ying wrote: > Yang Shi writes: > >> The generic migration path will check refcount, so no need check refcount >> here. >> But the old code actually prevents from migrating shared THP (mapped by >> multiple >> processes), so bail out early if mapcount is > 1 to

Re: [v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count

2021-04-13 Thread Huang, Ying
Yang Shi writes: > The generic migration path will check refcount, so no need check refcount > here. > But the old code actually prevents from migrating shared THP (mapped by > multiple > processes), so bail out early if mapcount is > 1 to keep the behavior. What prevents us from migrating

[v2 PATCH 6/7] mm: migrate: check mapcount for THP instead of ref count

2021-04-13 Thread Yang Shi
The generic migration path will check refcount, so no need check refcount here. But the old code actually prevents from migrating shared THP (mapped by multiple processes), so bail out early if mapcount is > 1 to keep the behavior. Signed-off-by: Yang Shi --- mm/migrate.c | 16