[PATCH] fix unuse_pmd fixme
From: Hugh Dickins <hugh@veritas.com> try_to_unuse drop mmlist_lock across unuse_process (with pretty dance of atomic_incs and mmputs of various mmlist markers, and a polite new cond_resched there), so unuse_process can pte_chain_alloc(GFP_KERNEL) and pass that down and down and down and down to unuse_pte: which cannot succeed more than once on a given mm (make that explicit by returning back up once succeeded). Preliminary checks moved up from unuse_pte to unuse_pmd, and done more efficiently (avoid that extra pte_file test added recently), swapoff spends far too long in here. Updated locking comments and references to try_to_swap_out.
Showing
Please register or sign in to comment