1 diff -urN linux/include/linux/swap.h linux-2.4.14-patched/include/linux/swap.h
2 --- linux/include/linux/swap.h Mon Nov 5 21:42:13 2001
3 +++ linux-2.4.14-patched/include/linux/swap.h Wed Nov 7 13:17:48 2001
5 extern void FASTCALL(__lru_cache_del(struct page *));
6 extern void FASTCALL(lru_cache_del(struct page *));
8 +extern void FASTCALL(deactivate_page(struct page *));
9 extern void FASTCALL(activate_page(struct page *));
11 extern void swap_setup(void);
12 diff -urN linux/mm/swap.c linux-2.4.14-patched/mm/swap.c
13 --- linux/mm/swap.c Sun Nov 4 19:29:49 2001
14 +++ linux-2.4.14-patched/mm/swap.c Wed Nov 7 13:17:26 2001
16 8, /* do swap I/O in clusters of this size */
20 + * (de)activate_page - move pages from/to active and inactive lists
21 + * @page: the page we want to move
22 + * @nolock - are we already holding the pagemap_lru_lock?
24 + * Deactivate_page will move an active page to the right
25 + * inactive list, while activate_page will move a page back
26 + * from one of the inactive lists to the active list. If
27 + * called on a page which is not on any of the lists, the
28 + * page is left alone.
30 +static inline void deactivate_page_nolock(struct page * page)
32 + if (PageActive(page)) {
33 + del_page_from_active_list(page);
34 + add_page_to_inactive_list(page);
38 +void deactivate_page(struct page * page)
40 + spin_lock(&pagemap_lru_lock);
41 + deactivate_page_nolock(page);
42 + spin_unlock(&pagemap_lru_lock);
46 * Move an inactive page to the active list.