Skip to content

Why skip readahead when swap_slot_cache is disabled #3

@RichardWeiYang

Description

@RichardWeiYang

commit ba81f83842549871cbd7226fc11530dc464500bb
Author: Huang Ying ying.huang@intel.com
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions