v2
2026-08-19
zswap跳过swap预读 · v2
提议zswap也绕过swap readahead,因其为内存同步后端;测试显示构建时间和readahead大幅下降。
原始补丁链接
子 Patch(3)
1/3
mm: swap: overlap synchronous readahead decompression with disk I/O
Swap readahead reads the whole window sequentially: the device I/Os are accumulated along the way while the synchronous, zswap-resident entries are decompressed inline. The I/O is only triggered after
2/3
mm: swap: bypass synchronous readahead unless the target needs I/O
The overlap pass reads the deferred synchronous neighbours while the first pass’ device I/O is in flight, hiding the synchronous work behind it. That only holds when the faulting target is itself serv
3/3
mm: swap: treat SWP_SYNCHRONOUS_IO devices as synchronous in readahead
A readahead neighbour on an SWP_SYNCHRONOUS_IO device (zram) has no asynchronous I/O to overlap either, exactly like a zswap-resident one. Extend swap_entry_synchronous() to take the swap device and a