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

2018-11-20 Thread Huang Ying
Previously, during swapout, all PMD page mapping will be split and replaced with PTE swap mapping. And when clearing the SWAP_HAS_CACHE flag for the huge swap cluster in put_swap_page(), the huge swap cluster will be split. Now, during swapout, the PMD page mappings to the THP will be changed to

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

2018-11-20 Thread Huang Ying
Previously, during swapout, all PMD page mapping will be split and replaced with PTE swap mapping. And when clearing the SWAP_HAS_CACHE flag for the huge swap cluster in put_swap_page(), the huge swap cluster will be split. Now, during swapout, the PMD page mappings to the THP will be changed to