Commit c262ffd
mm/shmem, swap: tidy up THP swapin checks
Move all THP swapin related checks under CONFIG_TRANSPARENT_HUGEPAGE, so
they will be trimmed off by the compiler if not needed.
And add a WARN if shmem sees a order > 0 entry when
CONFIG_TRANSPARENT_HUGEPAGE is disabled, that should never happen unless
things went very wrong.
There should be no observable feature change except the new added WARN.
Link: https://lkml.kernel.org/r/20250728075306.12704-4-ryncsn@gmail.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 0cfc0e7 commit c262ffd
1 file changed
Lines changed: 18 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2017 | 2017 | | |
2018 | 2018 | | |
2019 | 2019 | | |
| 2020 | + | |
2020 | 2021 | | |
2021 | 2022 | | |
2022 | | - | |
2023 | 2023 | | |
2024 | 2024 | | |
2025 | 2025 | | |
2026 | 2026 | | |
2027 | 2027 | | |
2028 | 2028 | | |
2029 | | - | |
2030 | | - | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
2031 | 2044 | | |
2032 | | - | |
| 2045 | + | |
2033 | 2046 | | |
2034 | 2047 | | |
2035 | 2048 | | |
2036 | 2049 | | |
2037 | 2050 | | |
2038 | 2051 | | |
2039 | | - | |
2040 | 2052 | | |
2041 | 2053 | | |
2042 | 2054 | | |
| |||
2320 | 2332 | | |
2321 | 2333 | | |
2322 | 2334 | | |
2323 | | - | |
2324 | | - | |
2325 | | - | |
2326 | 2335 | | |
2327 | 2336 | | |
2328 | 2337 | | |
2329 | 2338 | | |
2330 | 2339 | | |
2331 | 2340 | | |
2332 | 2341 | | |
2333 | | - | |
2334 | | - | |
2335 | | - | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
2341 | | - | |
2342 | | - | |
2343 | | - | |
2344 | | - | |
2345 | 2342 | | |
2346 | | - | |
| 2343 | + | |
2347 | 2344 | | |
2348 | 2345 | | |
2349 | 2346 | | |
| |||
0 commit comments