[PATCH -V5 RESEND 12/21] swap: Support PMD swap mapping in swapoff

2018-09-25 Thread Huang Ying
During swapoff, for a huge swap cluster, we need to allocate a THP, read its contents into the THP and unuse the PMD and PTE swap mappings to it. If failed to allocate a THP, the huge swap cluster will be split. During unuse, if it is found that the swap cluster mapped by a PMD swap mapping is sp

[PATCH -V5 RESEND 12/21] swap: Support PMD swap mapping in swapoff

2018-09-11 Thread Huang Ying
During swapoff, for a huge swap cluster, we need to allocate a THP, read its contents into the THP and unuse the PMD and PTE swap mappings to it. If failed to allocate a THP, the huge swap cluster will be split. During unuse, if it is found that the swap cluster mapped by a PMD swap mapping is sp