kernel_exploring icon indicating copy to clipboard operation
kernel_exploring copied to clipboard

Why skip readahead when swap_slot_cache is disabled

Open RichardWeiYang opened this issue 5 years ago • 0 comments

commit ba81f83842549871cbd7226fc11530dc464500bb Author: Huang Ying [email protected] Date: Wed Feb 22 15:45:46 2017 -0800

mm/swap: skip readahead only when swap slot cache is enabled

Because during swap off, a swap entry may have swap_map[] ==
SWAP_HAS_CACHE (for example, just allocated).  If we return NULL in
__read_swap_cache_async(), the swap off will abort.  So when swap slot
cache is disabled, (for swap off), we will wait for page to be put into
swap cache in such race condition.  This should not be a problem for swap
slot cache, because swap slot cache should be drained after clearing
swap_slot_cache_enabled.

Not get the point yet.

RichardWeiYang avatar Mar 15 '20 22:03 RichardWeiYang