[PATCH -V7 RESEND 03/21] swap: Support PMD swap mapping in swap_duplicate()

2018-11-20 Thread Huang Ying
To support to swapin the THP in one piece, 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.) for a huge swap

[PATCH -V7 RESEND 03/21] swap: Support PMD swap mapping in swap_duplicate()

2018-11-20 Thread Huang Ying
To support to swapin the THP in one piece, 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.) for a huge swap