Skip to contentSkip to conversation

swap: Add try_to_unuse_page_entry()

PATCH In review Richard Purdie 1 participant 1 message Jan 8, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 include/linux/swap.h |    1 
 mm/swapfile.c        |   52 ++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 40 insertions(+), 13 deletions(-)
include/linux/swap.h +1 -0
Index: git/include/linux/swap.h
===================================================================
@@ -253,6 +253,7 @@ extern sector_t swapdev_block(int, pgoff
 extern 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