swap: Add try_to_unuse_page_entry()
Subsystems (2)
PATCH 3/4 swap: Add try_to_unuse_page_entry()
Add try_to_unuse_page_entry(). As this function takes a already locked page, the locking and refcounting within try_to_unuse_entry() needs to be rearranged.
These patches are a based on a patch by Nick Piggin and some of my own patches/bugfixes as discussed on LKML.
Signed-off-by Richard Purdie <[email protected]>
--- include/linux/swap.h | 1 mm/swapfile.c | 52 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 13 deletions(-)
include/linux/swap.h +1 -0
@@ -253,6 +253,7 @@ extern sector_t swapdev_block(int, pgoffextern struct swap_info_struct *get_swap_info_struct (unsigned );extern int can_share_swap_page (struct page *);extern int remove_exclusive_swap_page (struct page *); +extern void try_to_unuse_page_entry (struct page *page);struct backing_dev_info ;extern spinlock_t swap_lock;
mm/swapfile.c +39 -13
93 lines not on this page · raw message