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

2018-11-20 Thread Huang Ying
When madvise_free() found a PMD swap mapping, if only part of the huge swap cluster is operated on, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Otherwise, if all huge swap cluster is operated on, free_swap_and_cache() will be called to decrease the PMD swap

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

2018-11-20 Thread Huang Ying
When madvise_free() found a PMD swap mapping, if only part of the huge swap cluster is operated on, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Otherwise, if all huge swap cluster is operated on, free_swap_and_cache() will be called to decrease the PMD swap