Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-13 Thread Daniel Jordan
On Wed, Jun 13, 2018 at 09:26:54AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > >> Daniel Jordan writes: > >> >> +#else > >> >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, > >> > > >> > This doesn't

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-13 Thread Daniel Jordan
On Wed, Jun 13, 2018 at 09:26:54AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > > On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > >> Daniel Jordan writes: > >> >> +#else > >> >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, > >> > > >> > This doesn't

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Huang, Ying
Daniel Jordan writes: > On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: >> Daniel Jordan writes: >> >> +#else >> >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, >> > >> > This doesn't need inline. >> >> Why not? This is just a one line stub. > > Forgot to

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Huang, Ying
Daniel Jordan writes: > On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: >> Daniel Jordan writes: >> >> +#else >> >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, >> > >> > This doesn't need inline. >> >> Why not? This is just a one line stub. > > Forgot to

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Daniel Jordan
On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > >> +#else > >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, > > > > This doesn't need inline. > > Why not? This is just a one line stub. Forgot to respond to this. The compiler will

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Daniel Jordan
On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > >> +#else > >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, > > > > This doesn't need inline. > > Why not? This is just a one line stub. Forgot to respond to this. The compiler will

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Daniel Jordan
On Tue, Jun 12, 2018 at 11:15:28AM +0800, Huang, Ying wrote: > "Huang, Ying" writes: > >> On Wed, May 23, 2018 at 04:26:07PM +0800, Huang, Ying wrote: > >>> @@ -3516,11 +3512,39 @@ static int __swap_duplicate(swp_entry_t entry, > >>> unsigned char usage) > >> > >> Two comments about this part of

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Daniel Jordan
On Tue, Jun 12, 2018 at 11:15:28AM +0800, Huang, Ying wrote: > "Huang, Ying" writes: > >> On Wed, May 23, 2018 at 04:26:07PM +0800, Huang, Ying wrote: > >>> @@ -3516,11 +3512,39 @@ static int __swap_duplicate(swp_entry_t entry, > >>> unsigned char usage) > >> > >> Two comments about this part of

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Daniel Jordan
On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > #2: We've masked off SWAP_HAS_CACHE and COUNT_CONTINUED, and already > > checked > > for SWAP_MAP_BAD, so I think condition #2 always fails and can just be > > removed. > > I think this is used to check

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-12 Thread Daniel Jordan
On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > > #2: We've masked off SWAP_HAS_CACHE and COUNT_CONTINUED, and already > > checked > > for SWAP_MAP_BAD, so I think condition #2 always fails and can just be > > removed. > > I think this is used to check

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-11 Thread Huang, Ying
"Huang, Ying" writes: >> On Wed, May 23, 2018 at 04:26:07PM +0800, Huang, Ying wrote: >>> @@ -3516,11 +3512,39 @@ static int __swap_duplicate(swp_entry_t entry, >>> unsigned char usage) >> >> Two comments about this part of __swap_duplicate as long as you're moving it >> to >> another function:

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-11 Thread Huang, Ying
"Huang, Ying" writes: >> On Wed, May 23, 2018 at 04:26:07PM +0800, Huang, Ying wrote: >>> @@ -3516,11 +3512,39 @@ static int __swap_duplicate(swp_entry_t entry, >>> unsigned char usage) >> >> Two comments about this part of __swap_duplicate as long as you're moving it >> to >> another function:

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-11 Thread Huang, Ying
Hi, Daniel, Thanks for your effort to review this series. Daniel Jordan writes: > Hi, > > The series up to and including this patch doesn't build. For this patch we > need: > > diff --git a/mm/swap_state.c b/mm/swap_state.c > index c6b3eab73fde..2f2d07627113 100644 > --- a/mm/swap_state.c >

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-11 Thread Huang, Ying
Hi, Daniel, Thanks for your effort to review this series. Daniel Jordan writes: > Hi, > > The series up to and including this patch doesn't build. For this patch we > need: > > diff --git a/mm/swap_state.c b/mm/swap_state.c > index c6b3eab73fde..2f2d07627113 100644 > --- a/mm/swap_state.c >

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-11 Thread Daniel Jordan
Hi, The series up to and including this patch doesn't build. For this patch we need: diff --git a/mm/swap_state.c b/mm/swap_state.c index c6b3eab73fde..2f2d07627113 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -433,7 +433,7 @@ struct page *__read_swap_cache_async(swp_entry_t entry,

Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-06-11 Thread Daniel Jordan
Hi, The series up to and including this patch doesn't build. For this patch we need: diff --git a/mm/swap_state.c b/mm/swap_state.c index c6b3eab73fde..2f2d07627113 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -433,7 +433,7 @@ struct page *__read_swap_cache_async(swp_entry_t entry,

[PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-05-23 Thread Huang, Ying
From: Huang Ying To support to swapin the THP as a whole, we need to create PMD swap mapping during swapout, and maintain PMD swap mapping count. This patch implements the support to increase the PMD swap mapping count (for swapout, fork, etc.) and set SWAP_HAS_CACHE flag

[PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-05-23 Thread Huang, Ying
From: Huang Ying To support to swapin the THP as a whole, we need to create PMD swap mapping during swapout, and maintain PMD swap mapping count. This patch implements the support to increase the PMD swap mapping count (for swapout, fork, etc.) and set SWAP_HAS_CACHE flag (for swapin, etc.)