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

2018-10-10 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

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

2018-10-10 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