[PATCH -V7 RESEND 17/21] swap: Support PMD swap mapping for MADV_WILLNEED

2018-11-20 Thread Huang Ying
During MADV_WILLNEED, for a PMD swap mapping, if THP swapin is enabled for the VMA, the whole swap cluster will be swapin. Otherwise, the huge swap cluster and the PMD swap mapping will be split and fallback to PTE swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea

[PATCH -V7 RESEND 17/21] swap: Support PMD swap mapping for MADV_WILLNEED

2018-11-20 Thread Huang Ying
During MADV_WILLNEED, for a PMD swap mapping, if THP swapin is enabled for the VMA, the whole swap cluster will be swapin. Otherwise, the huge swap cluster and the PMD swap mapping will be split and fallback to PTE swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea