Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-03-13 Thread Zi Yan
On 19 Feb 2019, at 20:38, Anshuman Khandual wrote: On 02/19/2019 06:26 PM, Matthew Wilcox wrote: On Tue, Feb 19, 2019 at 01:12:07PM +0530, Anshuman Khandual wrote: But the location of this temp page matters as well because you would like to saturate the inter node interface. It needs to be

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-21 Thread Zi Yan
On 21 Feb 2019, at 13:10, Jerome Glisse wrote: > On Fri, Feb 15, 2019 at 02:08:26PM -0800, Zi Yan wrote: >> From: Zi Yan >> >> In stead of using two migrate_pages(), a single exchange_pages() would >> be sufficient and without allocating new pages. > > So i believe it would be better to arrange

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-21 Thread Jerome Glisse
On Fri, Feb 15, 2019 at 02:08:26PM -0800, Zi Yan wrote: > From: Zi Yan > > In stead of using two migrate_pages(), a single exchange_pages() would > be sufficient and without allocating new pages. So i believe it would be better to arrange the code differently instead of having one function that

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-19 Thread Anshuman Khandual
On 02/19/2019 06:26 PM, Matthew Wilcox wrote: > On Tue, Feb 19, 2019 at 01:12:07PM +0530, Anshuman Khandual wrote: >> But the location of this temp page matters as well because you would like to >> saturate the inter node interface. It needs to be either of the nodes where >> the source or

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-19 Thread Matthew Wilcox
On Tue, Feb 19, 2019 at 01:12:07PM +0530, Anshuman Khandual wrote: > But the location of this temp page matters as well because you would like to > saturate the inter node interface. It needs to be either of the nodes where > the source or destination page belongs. Any other node would generate

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-18 Thread Anshuman Khandual
On 02/18/2019 11:29 PM, Zi Yan wrote: > On 18 Feb 2019, at 9:52, Matthew Wilcox wrote: > >> On Mon, Feb 18, 2019 at 09:51:33AM -0800, Zi Yan wrote: >>> On 18 Feb 2019, at 9:42, Vlastimil Babka wrote: On 2/18/19 6:31 PM, Zi Yan wrote: > The purpose of proposing exchange_pages() is to

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-18 Thread Zi Yan
On 18 Feb 2019, at 9:52, Matthew Wilcox wrote: > On Mon, Feb 18, 2019 at 09:51:33AM -0800, Zi Yan wrote: >> On 18 Feb 2019, at 9:42, Vlastimil Babka wrote: >>> On 2/18/19 6:31 PM, Zi Yan wrote: The purpose of proposing exchange_pages() is to avoid allocating any new page, so

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-18 Thread Matthew Wilcox
On Mon, Feb 18, 2019 at 09:51:33AM -0800, Zi Yan wrote: > On 18 Feb 2019, at 9:42, Vlastimil Babka wrote: > > On 2/18/19 6:31 PM, Zi Yan wrote: > > > The purpose of proposing exchange_pages() is to avoid allocating any > > > new > > > page, > > > so that we would not trigger any potential page

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-18 Thread Zi Yan
On 18 Feb 2019, at 9:42, Vlastimil Babka wrote: On 2/18/19 6:31 PM, Zi Yan wrote: The purpose of proposing exchange_pages() is to avoid allocating any new page, so that we would not trigger any potential page reclaim or memory compaction. Allocating a temporary page defeats the purpose.

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-18 Thread Vlastimil Babka
On 2/18/19 6:31 PM, Zi Yan wrote: > The purpose of proposing exchange_pages() is to avoid allocating any new > page, > so that we would not trigger any potential page reclaim or memory > compaction. > Allocating a temporary page defeats the purpose. Compaction can only happen for order > 0

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-18 Thread Zi Yan
On 17 Feb 2019, at 3:29, Matthew Wilcox wrote: On Fri, Feb 15, 2019 at 02:08:26PM -0800, Zi Yan wrote: +struct page_flags { + unsigned int page_error :1; + unsigned int page_referenced:1; + unsigned int page_uptodate:1; + unsigned int page_active:1; + unsigned int

Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-17 Thread Matthew Wilcox
On Fri, Feb 15, 2019 at 02:08:26PM -0800, Zi Yan wrote: > +struct page_flags { > + unsigned int page_error :1; > + unsigned int page_referenced:1; > + unsigned int page_uptodate:1; > + unsigned int page_active:1; > + unsigned int page_unevictable:1; > + unsigned int

[RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-15 Thread Zi Yan
From: Zi Yan In stead of using two migrate_pages(), a single exchange_pages() would be sufficient and without allocating new pages. Signed-off-by: Zi Yan --- include/linux/ksm.h | 5 + mm/Makefile | 1 + mm/exchange.c | 846

[RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages.

2019-02-15 Thread Zi Yan
In stead of using two migrate_pages(), a single exchange_pages() would be sufficient and without allocating new pages. Signed-off-by: Zi Yan --- include/linux/ksm.h | 5 + mm/Makefile | 1 + mm/exchange.c | 846 mm/internal.h