Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-12 Thread Minchan Kim
> > To: sunqiuyang > > > Cc: linux-kernel@vger.kernel.org; linux...@kvack.org > > > Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of > > > non-LRU movable pages > > > > > > On Wed 04-09-19 12:19:11, sunqiuyang wrote: &g

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-10 Thread Michal Hocko
On Tue 10-09-19 12:23:04, Minchan Kim wrote: > On Tue, Sep 03, 2019 at 04:27:46PM +0800, sunqiuyang wrote: > > From: Qiuyang Sun > > > > Currently, after a page is migrated, it > > 1) has its PG_isolated flag cleared in move_to_new_page(), and > > 2) is deleted from its LRU list

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-10 Thread Minchan Kim
On Tue, Sep 03, 2019 at 04:27:46PM +0800, sunqiuyang wrote: > From: Qiuyang Sun > > Currently, after a page is migrated, it > 1) has its PG_isolated flag cleared in move_to_new_page(), and > 2) is deleted from its LRU list (cc->migratepages) in unmap_and_move(). > However, between steps 1) and

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-09 Thread Michal Hocko
; > Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of > > non-LRU movable pages > > > > On Wed 04-09-19 12:19:11, sunqiuyang wrote: > > > > Do not top post please > > > > > > > > On Wed 04-09-19 07:27:25,

RE: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-04 Thread sunqiuyang
From: Michal Hocko [mho...@kernel.org] Sent: Wednesday, September 04, 2019 20:52 To: sunqiuyang Cc: linux-kernel@vger.kernel.org; linux...@kvack.org Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages On Wed 04

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-04 Thread Michal Hocko
On Wed 04-09-19 12:19:11, sunqiuyang wrote: > > Do not top post please > > > > On Wed 04-09-19 07:27:25, sunqiuyang wrote: > > > isolate_migratepages_block() from another thread may try to isolate the > > > page again: > > > > > > for (; low_pfn < end_pfn; low_pfn++) { > > > /* ... */ > > >

RE: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-04 Thread sunqiuyang
From: Michal Hocko [mho...@kernel.org] Sent: Wednesday, September 04, 2019 16:14 To: sunqiuyang Cc: linux-kernel@vger.kernel.org; linux...@kvack.org Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages Do

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-04 Thread Michal Hocko
Do not top post please On Wed 04-09-19 07:27:25, sunqiuyang wrote: > isolate_migratepages_block() from another thread may try to isolate the page > again: > > for (; low_pfn < end_pfn; low_pfn++) { > /* ... */ > page = pfn_to_page(low_pfn); > /* ... */ > if (!PageLRU(page)) { > if

RE: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-04 Thread sunqiuyang
through this path? From: Michal Hocko [mho...@kernel.org] Sent: Wednesday, September 04, 2019 14:38 To: sunqiuyang Cc: linux-kernel@vger.kernel.org; linux...@kvack.org Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages On Wed 04-09-19 02:18:38,

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-04 Thread Michal Hocko
On Wed 04-09-19 02:18:38, sunqiuyang wrote: > The isolate path of non-lru movable pages: > > isolate_migratepages_block > isolate_movable_page > trylock_page > // if PageIsolated, goto out_no_isolated > a_ops->isolate_page >

RE: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-03 Thread sunqiuyang
sunqiuyang Cc: linux-kernel@vger.kernel.org; linux...@kvack.org Subject: Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages On Tue 03-09-19 16:27:46, sunqiuyang wrote: > From: Qiuyang Sun > > Currently, after a page is migrated, it > 1) has its

Re: [PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-03 Thread Michal Hocko
On Tue 03-09-19 16:27:46, sunqiuyang wrote: > From: Qiuyang Sun > > Currently, after a page is migrated, it > 1) has its PG_isolated flag cleared in move_to_new_page(), and > 2) is deleted from its LRU list (cc->migratepages) in unmap_and_move(). > However, between steps 1) and 2), the page

[PATCH 1/1] mm/migrate: fix list corruption in migration of non-LRU movable pages

2019-09-03 Thread sunqiuyang
From: Qiuyang Sun Currently, after a page is migrated, it 1) has its PG_isolated flag cleared in move_to_new_page(), and 2) is deleted from its LRU list (cc->migratepages) in unmap_and_move(). However, between steps 1) and 2), the page could be isolated by another thread in