Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-21 Thread Yang Shi
On 6/21/19 4:33 AM, Vlastimil Babka wrote: On 6/20/19 6:08 PM, Yang Shi wrote: On 6/20/19 12:18 AM, Vlastimil Babka wrote: On 6/19/19 8:19 PM, Yang Shi wrote: This is getting even more muddy TBH. Is there any reason that we have to handle this problem during the isolation phase rather the

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-21 Thread Vlastimil Babka
On 6/20/19 6:08 PM, Yang Shi wrote: > > > On 6/20/19 12:18 AM, Vlastimil Babka wrote: >> On 6/19/19 8:19 PM, Yang Shi wrote: >> This is getting even more muddy TBH. Is there any reason that we >> have to >> handle this problem during the isolation phase rather the migration? > I t

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-20 Thread Yang Shi
On 6/20/19 12:18 AM, Vlastimil Babka wrote: On 6/19/19 8:19 PM, Yang Shi wrote: This is getting even more muddy TBH. Is there any reason that we have to handle this problem during the isolation phase rather the migration? I think it was already said that if pages can't be isolated, then migr

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-20 Thread Vlastimil Babka
On 6/19/19 8:19 PM, Yang Shi wrote: This is getting even more muddy TBH. Is there any reason that we have to handle this problem during the isolation phase rather the migration? >>> I think it was already said that if pages can't be isolated, then >>> migration phase won't process t

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-19 Thread Yang Shi
On 6/19/19 9:21 AM, Yang Shi wrote: On 6/19/19 1:22 AM, Vlastimil Babka wrote: On 6/19/19 7:21 AM, Michal Hocko wrote: On Tue 18-06-19 14:13:16, Yang Shi wrote: [...] I used to have !__PageMovable(page), but it was removed since the aforementioned reason. I could add it back. For the tem

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-19 Thread Yang Shi
On 6/19/19 1:18 AM, Vlastimil Babka wrote: On 6/18/19 7:06 PM, Yang Shi wrote: The BUG_ON was removed by commit d44d363f65780f2ac2ec672164555af54896d40d ("mm: don't assume anonymous pages have SwapBacked flag") since 4.12. Perhaps that commit should be sent to stable@ ? Although with VM_BUG_

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-19 Thread Yang Shi
On 6/19/19 1:22 AM, Vlastimil Babka wrote: On 6/19/19 7:21 AM, Michal Hocko wrote: On Tue 18-06-19 14:13:16, Yang Shi wrote: [...] I used to have !__PageMovable(page), but it was removed since the aforementioned reason. I could add it back. For the temporary off LRU page, I did a quick sear

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-19 Thread Vlastimil Babka
On 6/19/19 7:21 AM, Michal Hocko wrote: > On Tue 18-06-19 14:13:16, Yang Shi wrote: > [...] >> >> I used to have !__PageMovable(page), but it was removed since the >> aforementioned reason. I could add it back. >> >> For the temporary off LRU page, I did a quick search, it looks the most >> paths h

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-19 Thread Vlastimil Babka
On 6/18/19 7:06 PM, Yang Shi wrote: > The BUG_ON was removed by commit > d44d363f65780f2ac2ec672164555af54896d40d ("mm: don't assume anonymous > pages have SwapBacked flag") since 4.12. Perhaps that commit should be sent to stable@ ? Although with VM_BUG_ON() this is less critical than plain BUG

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-18 Thread Michal Hocko
On Tue 18-06-19 14:13:16, Yang Shi wrote: [...] > > > > > Change migrate_page_add() to check if the page is movable or not, if > > > > > it > > > > > is unmovable, just return -EIO. We don't have to check non-LRU > > > > > movable > > > > > pages since just zsmalloc and virtio-baloon support thi

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-18 Thread Yang Shi
On 6/18/19 11:28 AM, Michal Hocko wrote: On Tue 18-06-19 10:06:54, Yang Shi wrote: On 6/18/19 6:02 AM, Michal Hocko wrote: [Cc networking people - see a question about setsockopt below] On Tue 18-06-19 02:48:10, Yang Shi wrote: When running syzkaller internally, we ran into the below bug

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-18 Thread Michal Hocko
On Tue 18-06-19 10:06:54, Yang Shi wrote: > > > On 6/18/19 6:02 AM, Michal Hocko wrote: > > [Cc networking people - see a question about setsockopt below] > > > > On Tue 18-06-19 02:48:10, Yang Shi wrote: > > > When running syzkaller internally, we ran into the below bug on 4.9.x > > > kernel: >

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-18 Thread Yang Shi
On 6/18/19 6:02 AM, Michal Hocko wrote: [Cc networking people - see a question about setsockopt below] On Tue 18-06-19 02:48:10, Yang Shi wrote: When running syzkaller internally, we ran into the below bug on 4.9.x kernel: kernel BUG at mm/huge_memory.c:2124! What is the BUG_ON because I d

Re: [PATCH] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-18 Thread Michal Hocko
[Cc networking people - see a question about setsockopt below] On Tue 18-06-19 02:48:10, Yang Shi wrote: > When running syzkaller internally, we ran into the below bug on 4.9.x > kernel: > > kernel BUG at mm/huge_memory.c:2124! What is the BUG_ON because I do not see any BUG_ON neither in v4.9 n