[RFC PATCH 3/3] mm: unclutter THP migration

2017-12-08 Thread Michal Hocko
From: Michal Hocko THP migration is hacked into the generic migration with rather surprising semantic. The migration allocation callback is supposed to check whether the THP can be migrated at once and if that is not the case then it allocates a simple page to migrate. unmap_and_move then fixes t

Re: [RFC PATCH 3/3] mm: unclutter THP migration

2017-12-26 Thread Zi Yan
On 8 Dec 2017, at 11:15, Michal Hocko wrote: > From: Michal Hocko > > THP migration is hacked into the generic migration with rather > surprising semantic. The migration allocation callback is supposed to > check whether the THP can be migrated at once and if that is not the > case then it alloca

Re: [RFC PATCH 3/3] mm: unclutter THP migration

2017-12-13 Thread Kirill A. Shutemov
On Fri, Dec 08, 2017 at 05:15:59PM +0100, Michal Hocko wrote: > From: Michal Hocko > > THP migration is hacked into the generic migration with rather > surprising semantic. The migration allocation callback is supposed to > check whether the THP can be migrated at once and if that is not the > ca

Re: [RFC PATCH 3/3] mm: unclutter THP migration

2017-12-29 Thread Michal Hocko
On Tue 26-12-17 21:19:35, Zi Yan wrote: > On 8 Dec 2017, at 11:15, Michal Hocko wrote: [...] > > @@ -1394,6 +1390,21 @@ int migrate_pages(struct list_head *from, new_page_t > > get_new_page, > > > > switch(rc) { > > case -ENOMEM: > > +

Re: [RFC PATCH 3/3] mm: unclutter THP migration

2017-12-29 Thread Zi Yan
On 29 Dec 2017, at 6:36, Michal Hocko wrote: > On Tue 26-12-17 21:19:35, Zi Yan wrote: >> On 8 Dec 2017, at 11:15, Michal Hocko wrote: > [...] >>> @@ -1394,6 +1390,21 @@ int migrate_pages(struct list_head *from, new_page_t >>> get_new_page, >>> >>> switch(rc) { >>>

Re: [RFC PATCH 3/3] mm: unclutter THP migration

2017-12-31 Thread Michal Hocko
On Fri 29-12-17 10:45:46, Zi Yan wrote: > On 29 Dec 2017, at 6:36, Michal Hocko wrote: > > > On Tue 26-12-17 21:19:35, Zi Yan wrote: [...] > >> And it seems a little bit strange to only re-migrate the head page, then > >> come back to all tail > >> pages after migrating the rest of pages in the l

Re: [RFC PATCH 3/3] mm: unclutter THP migration

2017-12-31 Thread Zi Yan
On 31 Dec 2017, at 4:07, Michal Hocko wrote: > On Fri 29-12-17 10:45:46, Zi Yan wrote: >> On 29 Dec 2017, at 6:36, Michal Hocko wrote: >> >>> On Tue 26-12-17 21:19:35, Zi Yan wrote: > [...] And it seems a little bit strange to only re-migrate the head page, then come back to all tail >>