Re: [PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-07-03 Thread Huang, Ying
Daniel Jordan writes: > On Fri, Jun 22, 2018 at 11:51:38AM +0800, Huang, Ying wrote: >> @@ -411,14 +414,32 @@ struct page *__read_swap_cache_async(swp_entry_t >> entry, gfp_t gfp_mask, > ... >> +if (thp_swap_supported() && huge_cluster) { >> +gfp_t

Re: [PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-07-03 Thread Daniel Jordan
On Fri, Jun 22, 2018 at 11:51:38AM +0800, Huang, Ying wrote: > @@ -411,14 +414,32 @@ struct page *__read_swap_cache_async(swp_entry_t entry, > gfp_t gfp_mask, ... > + if (thp_swap_supported() && huge_cluster) { > + gfp_t gfp = alloc_hugepage_direct_g

Re: [PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-07-02 Thread Huang, Ying
Matthew Wilcox writes: > On Fri, Jun 22, 2018 at 11:51:38AM +0800, Huang, Ying wrote: >> +++ b/mm/swap_state.c >> @@ -426,33 +447,37 @@ struct page *__read_swap_cache_async(swp_entry_t >> entry, gfp_t gfp_mask, >> /* >> * call radix_tree_preload() while we can wait. >>

Re: [PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-06-28 Thread Matthew Wilcox
On Fri, Jun 22, 2018 at 11:51:38AM +0800, Huang, Ying wrote: > +++ b/mm/swap_state.c > @@ -426,33 +447,37 @@ struct page *__read_swap_cache_async(swp_entry_t entry, > gfp_t gfp_mask, > /* >* call radix_tree_preload() while we can wait. >*/ > -

[PATCH -mm -v4 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-06-21 Thread Huang, Ying
From: Huang Ying To swapin a THP as a whole, we need to read a huge swap cluster from the swap device. This patch revised the __read_swap_cache_async() and its callers and callees to support this. If __read_swap_cache_async() find the swap cluster of the specified swap entry is huge, it will tr