Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-24 Thread Guoqing Jiang
On 5/23/20 1:53 AM, Andrew Morton wrote: On Fri, 22 May 2020 09:18:25 +0200 Guoqing Jiang wrote: - ClearPagePrivate(page); - set_page_private(newpage, page_private(page)); - set_page_private(page, 0); - put_page(page); + set_page_private(newpage, detach_page_priv

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-22 Thread Andrew Morton
On Fri, 22 May 2020 09:18:25 +0200 Guoqing Jiang wrote: > >> - ClearPagePrivate(page); > >> - set_page_private(newpage, page_private(page)); > >> - set_page_private(page, 0); > >> - put_page(page); > >> + set_page_private(newpage, detach_page_private(page)); > > attach_page_private(newpage,

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-22 Thread Guoqing Jiang
Hi Dave, On 5/22/20 12:52 AM, Dave Chinner wrote: On Sun, May 17, 2020 at 11:47:18PM +0200, Guoqing Jiang wrote: We can cleanup code a little by call detach_page_private here. Signed-off-by: Guoqing Jiang --- No change since RFC V3. mm/migrate.c | 5 + 1 file changed, 1 insertion(+),

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-21 Thread Dave Chinner
On Sun, May 17, 2020 at 11:47:18PM +0200, Guoqing Jiang wrote: > We can cleanup code a little by call detach_page_private here. > > Signed-off-by: Guoqing Jiang > --- > No change since RFC V3. > > mm/migrate.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/mm/migr

[UPDATE PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Guoqing Jiang
We can cleanup code a little by call detach_page_private here. Signed-off-by: Guoqing Jiang --- Add the cast to fix type mismatch warning, sorry for the mistake. mm/migrate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 7160c1556f79..

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Guoqing Jiang
Hi Andrew, On 5/19/20 9:35 AM, Guoqing Jiang wrote: On 5/19/20 7:12 AM, Andrew Morton wrote: On Sun, 17 May 2020 23:47:18 +0200 Guoqing Jiang wrote: We can cleanup code a little by call detach_page_private here. ... --- a/mm/migrate.c +++ b/mm/migrate.c @@ -804,10 +804,7 @@ static int __b

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Gao Xiang
Hi Matthew, On Tue, May 19, 2020 at 08:16:32AM -0700, Matthew Wilcox wrote: > On Tue, May 19, 2020 at 06:06:19PM +0800, Gao Xiang wrote: > > In addition, I found some limitation of new {attach,detach}_page_private > > helper (that is why I was interested in this series at that time [1] [2], > > bu

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Matthew Wilcox
On Tue, May 19, 2020 at 06:06:19PM +0800, Gao Xiang wrote: > In addition, I found some limitation of new {attach,detach}_page_private > helper (that is why I was interested in this series at that time [1] [2], > but I gave up finally) since many patterns (not all) in EROFS are > > io_submit (origi

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Gao Xiang
On Tue, May 19, 2020 at 01:02:26PM +0200, Guoqing Jiang wrote: > On 5/19/20 12:06 PM, Gao Xiang wrote: > > On Tue, May 19, 2020 at 09:35:59AM +0200, Guoqing Jiang wrote: > > > On 5/19/20 7:12 AM, Andrew Morton wrote: > > > > On Sun, 17 May 2020 23:47:18 +0200 Guoqing Jiang > > > > wrote: > > > >

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Guoqing Jiang
On 5/19/20 12:06 PM, Gao Xiang wrote: On Tue, May 19, 2020 at 09:35:59AM +0200, Guoqing Jiang wrote: On 5/19/20 7:12 AM, Andrew Morton wrote: On Sun, 17 May 2020 23:47:18 +0200 Guoqing Jiang wrote: We can cleanup code a little by call detach_page_private here. ... --- a/mm/migrate.c +++ b

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Gao Xiang
On Tue, May 19, 2020 at 09:35:59AM +0200, Guoqing Jiang wrote: > On 5/19/20 7:12 AM, Andrew Morton wrote: > > On Sun, 17 May 2020 23:47:18 +0200 Guoqing Jiang > > wrote: > > > > > We can cleanup code a little by call detach_page_private here. > > > > > > ... > > > > > > --- a/mm/migrate.c > > > +

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-19 Thread Guoqing Jiang
On 5/19/20 7:12 AM, Andrew Morton wrote: On Sun, 17 May 2020 23:47:18 +0200 Guoqing Jiang wrote: We can cleanup code a little by call detach_page_private here. ... --- a/mm/migrate.c +++ b/mm/migrate.c @@ -804,10 +804,7 @@ static int __buffer_migrate_page(struct address_space *mapping,

Re: [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-18 Thread Andrew Morton
On Sun, 17 May 2020 23:47:18 +0200 Guoqing Jiang wrote: > We can cleanup code a little by call detach_page_private here. > > ... > > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -804,10 +804,7 @@ static int __buffer_migrate_page(struct address_space > *mapping, > if (rc != MIGRATEPAGE_SU

[PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code

2020-05-17 Thread Guoqing Jiang
We can cleanup code a little by call detach_page_private here. Signed-off-by: Guoqing Jiang --- No change since RFC V3. mm/migrate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 5fed0305d2ec..f99502bc113c 100644 --- a/mm/migrate.c +++