Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-14 Thread Baoquan He
On 11/15/18 at 11:13am, Baoquan He wrote: > On 11/06/18 at 10:55am, Michal Hocko wrote: > > From: Michal Hocko > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > -m 200 -t 2h) it is quite easy to hit a race window when the page is > > allocated but its state is

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-14 Thread Baoquan He
On 11/15/18 at 11:13am, Baoquan He wrote: > On 11/06/18 at 10:55am, Michal Hocko wrote: > > From: Michal Hocko > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > -m 200 -t 2h) it is quite easy to hit a race window when the page is > > allocated but its state is

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-14 Thread Baoquan He
On 11/06/18 at 10:55am, Michal Hocko wrote: > From: Michal Hocko > > Page state checks are racy. Under a heavy memory workload (e.g. stress > -m 200 -t 2h) it is quite easy to hit a race window when the page is > allocated but its state is not fully populated yet. A debugging patch to The

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-14 Thread Baoquan He
On 11/06/18 at 10:55am, Michal Hocko wrote: > From: Michal Hocko > > Page state checks are racy. Under a heavy memory workload (e.g. stress > -m 200 -t 2h) it is quite easy to hit a race window when the page is > allocated but its state is not fully populated yet. A debugging patch to The

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-09 Thread Balbir Singh
On Wed, Nov 07, 2018 at 02:06:55PM +0100, Michal Hocko wrote: > On Wed 07-11-18 23:53:24, Balbir Singh wrote: > > On Wed, Nov 07, 2018 at 08:35:48AM +0100, Michal Hocko wrote: > > > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > [...] > > > > The check seems to be quite aggressive and in a loop

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-09 Thread Balbir Singh
On Wed, Nov 07, 2018 at 02:06:55PM +0100, Michal Hocko wrote: > On Wed 07-11-18 23:53:24, Balbir Singh wrote: > > On Wed, Nov 07, 2018 at 08:35:48AM +0100, Michal Hocko wrote: > > > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > [...] > > > > The check seems to be quite aggressive and in a loop

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-07 Thread Michal Hocko
On Wed 07-11-18 23:53:24, Balbir Singh wrote: > On Wed, Nov 07, 2018 at 08:35:48AM +0100, Michal Hocko wrote: > > On Wed 07-11-18 07:35:18, Balbir Singh wrote: [...] > > > The check seems to be quite aggressive and in a loop that iterates > > > pages, but has nothing to do with the page, did you

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-07 Thread Michal Hocko
On Wed 07-11-18 23:53:24, Balbir Singh wrote: > On Wed, Nov 07, 2018 at 08:35:48AM +0100, Michal Hocko wrote: > > On Wed 07-11-18 07:35:18, Balbir Singh wrote: [...] > > > The check seems to be quite aggressive and in a loop that iterates > > > pages, but has nothing to do with the page, did you

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-07 Thread Balbir Singh
On Wed, Nov 07, 2018 at 08:35:48AM +0100, Michal Hocko wrote: > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > > -m 200

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-07 Thread Balbir Singh
On Wed, Nov 07, 2018 at 08:35:48AM +0100, Michal Hocko wrote: > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > > -m 200

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-07 Thread Michal Hocko
On Wed 07-11-18 08:55:26, osalvador wrote: > On Wed, 2018-11-07 at 08:35 +0100, Michal Hocko wrote: > > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > > The check seems to be quite aggressive and in a loop that iterates > > > pages, but has nothing to do with the page, did you mean to make > >

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-07 Thread Michal Hocko
On Wed 07-11-18 08:55:26, osalvador wrote: > On Wed, 2018-11-07 at 08:35 +0100, Michal Hocko wrote: > > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > > The check seems to be quite aggressive and in a loop that iterates > > > pages, but has nothing to do with the page, did you mean to make > >

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread osalvador
On Wed, 2018-11-07 at 08:35 +0100, Michal Hocko wrote: > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > The check seems to be quite aggressive and in a loop that iterates > > pages, but has nothing to do with the page, did you mean to make > > the check > > > > zone_idx(page_zone(page)) ==

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread osalvador
On Wed, 2018-11-07 at 08:35 +0100, Michal Hocko wrote: > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > The check seems to be quite aggressive and in a loop that iterates > > pages, but has nothing to do with the page, did you mean to make > > the check > > > > zone_idx(page_zone(page)) ==

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Michal Hocko
On Wed 07-11-18 08:35:48, Michal Hocko wrote: > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > > -m 200 -t 2h) it is

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Michal Hocko
On Wed 07-11-18 08:35:48, Michal Hocko wrote: > On Wed 07-11-18 07:35:18, Balbir Singh wrote: > > On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > > -m 200 -t 2h) it is

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Michal Hocko
On Wed 07-11-18 07:35:18, Balbir Singh wrote: > On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > -m 200 -t 2h) it is quite easy to hit a race window when the page is > >

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Michal Hocko
On Wed 07-11-18 07:35:18, Balbir Singh wrote: > On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Page state checks are racy. Under a heavy memory workload (e.g. stress > > -m 200 -t 2h) it is quite easy to hit a race window when the page is > >

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Balbir Singh
On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > From: Michal Hocko > > Page state checks are racy. Under a heavy memory workload (e.g. stress > -m 200 -t 2h) it is quite easy to hit a race window when the page is > allocated but its state is not fully populated yet. A debugging

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Balbir Singh
On Tue, Nov 06, 2018 at 10:55:24AM +0100, Michal Hocko wrote: > From: Michal Hocko > > Page state checks are racy. Under a heavy memory workload (e.g. stress > -m 200 -t 2h) it is quite easy to hit a race window when the page is > allocated but its state is not fully populated yet. A debugging

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread osalvador
On Tue, 2018-11-06 at 10:55 +0100, Michal Hocko wrote: > From: Michal Hocko > > Reported-and-tested-by: Baoquan He > Acked-by: Baoquan He > Fixes: "mm, memory_hotplug: make has_unmovable_pages more robust") > Signed-off-by: Michal Hocko Looks good to me. Reviewed-by: Oscar Salvador Oscar

Re: [PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread osalvador
On Tue, 2018-11-06 at 10:55 +0100, Michal Hocko wrote: > From: Michal Hocko > > Reported-and-tested-by: Baoquan He > Acked-by: Baoquan He > Fixes: "mm, memory_hotplug: make has_unmovable_pages more robust") > Signed-off-by: Michal Hocko Looks good to me. Reviewed-by: Oscar Salvador Oscar

[PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Michal Hocko
From: Michal Hocko Page state checks are racy. Under a heavy memory workload (e.g. stress -m 200 -t 2h) it is quite easy to hit a race window when the page is allocated but its state is not fully populated yet. A debugging patch to dump the struct page state shows : [ 476.575516]

[PATCH] mm, memory_hotplug: check zone_movable in has_unmovable_pages

2018-11-06 Thread Michal Hocko
From: Michal Hocko Page state checks are racy. Under a heavy memory workload (e.g. stress -m 200 -t 2h) it is quite easy to hit a race window when the page is allocated but its state is not fully populated yet. A debugging patch to dump the struct page state shows : [ 476.575516]