patch-2.4.14 linux/include/linux/swap.h
Next file: linux/include/linux/tcp.h
Previous file: linux/include/linux/sockios.h
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Mon Nov 5 12:42:13 2001
- Orig file:
v2.4.13/linux/include/linux/swap.h
- Orig date:
Tue Oct 23 22:48:53 2001
diff -u --recursive --new-file v2.4.13/linux/include/linux/swap.h linux/include/linux/swap.h
@@ -79,6 +79,10 @@
};
extern int nr_swap_pages;
+
+/* Swap 50% full? Release swapcache more aggressively.. */
+#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
+
extern unsigned int nr_free_pages(void);
extern unsigned int nr_free_buffer_pages(void);
extern int nr_active_pages;
@@ -101,7 +105,6 @@
extern void FASTCALL(__lru_cache_del(struct page *));
extern void FASTCALL(lru_cache_del(struct page *));
-extern void FASTCALL(deactivate_page(struct page *));
extern void FASTCALL(activate_page(struct page *));
extern void swap_setup(void);
@@ -129,8 +132,7 @@
extern struct page * read_swap_cache_async(swp_entry_t);
/* linux/mm/oom_kill.c */
-extern int out_of_memory(void);
-extern void oom_kill(void);
+extern void out_of_memory(void);
/* linux/mm/swapfile.c */
extern int total_swap_pages;
@@ -145,6 +147,7 @@
extern int swap_count(struct page *);
extern int valid_swaphandles(swp_entry_t, unsigned long *);
extern void swap_free(swp_entry_t);
+extern void free_swap_and_cache(swp_entry_t);
struct swap_list_t {
int head; /* head of priority-ordered swapfile list */
int next; /* swapfile to be used next */
@@ -192,7 +195,6 @@
list_del(&(page)->lru); \
ClearPageActive(page); \
nr_active_pages--; \
- DEBUG_LRU_PAGE(page); \
} while (0)
#define del_page_from_inactive_list(page) \
@@ -200,7 +202,6 @@
list_del(&(page)->lru); \
ClearPageInactive(page); \
nr_inactive_pages--; \
- DEBUG_LRU_PAGE(page); \
} while (0)
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)