|
@@ -158,9 +158,6 @@ struct swap_list_t {
|
|
/* Swap 50% full? Release swapcache more aggressively.. */
|
|
/* Swap 50% full? Release swapcache more aggressively.. */
|
|
#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
|
|
#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
|
|
|
|
|
|
-/* linux/mm/memory.c */
|
|
|
|
-extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
|
|
|
|
-
|
|
|
|
/* linux/mm/page_alloc.c */
|
|
/* linux/mm/page_alloc.c */
|
|
extern unsigned long totalram_pages;
|
|
extern unsigned long totalram_pages;
|
|
extern unsigned long totalreserve_pages;
|
|
extern unsigned long totalreserve_pages;
|
|
@@ -230,9 +227,12 @@ extern int move_from_swap_cache(struct page *, unsigned long,
|
|
struct address_space *);
|
|
struct address_space *);
|
|
extern void free_page_and_swap_cache(struct page *);
|
|
extern void free_page_and_swap_cache(struct page *);
|
|
extern void free_pages_and_swap_cache(struct page **, int);
|
|
extern void free_pages_and_swap_cache(struct page **, int);
|
|
-extern struct page * lookup_swap_cache(swp_entry_t);
|
|
|
|
-extern struct page * read_swap_cache_async(swp_entry_t, struct vm_area_struct *vma,
|
|
|
|
- unsigned long addr);
|
|
|
|
|
|
+extern struct page *lookup_swap_cache(swp_entry_t);
|
|
|
|
+extern struct page *read_swap_cache_async(swp_entry_t,
|
|
|
|
+ struct vm_area_struct *vma, unsigned long addr);
|
|
|
|
+extern struct page *swapin_readahead(swp_entry_t,
|
|
|
|
+ struct vm_area_struct *vma, unsigned long addr);
|
|
|
|
+
|
|
/* linux/mm/swapfile.c */
|
|
/* linux/mm/swapfile.c */
|
|
extern long total_swap_pages;
|
|
extern long total_swap_pages;
|
|
extern unsigned int nr_swapfiles;
|
|
extern unsigned int nr_swapfiles;
|
|
@@ -306,7 +306,7 @@ static inline void swap_free(swp_entry_t swp)
|
|
{
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
-static inline struct page *read_swap_cache_async(swp_entry_t swp,
|
|
|
|
|
|
+static inline struct page *swapin_readahead(swp_entry_t swp,
|
|
struct vm_area_struct *vma, unsigned long addr)
|
|
struct vm_area_struct *vma, unsigned long addr)
|
|
{
|
|
{
|
|
return NULL;
|
|
return NULL;
|
|
@@ -317,11 +317,6 @@ static inline struct page *lookup_swap_cache(swp_entry_t swp)
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
-static inline int valid_swaphandles(swp_entry_t entry, unsigned long *offset)
|
|
|
|
-{
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#define can_share_swap_page(p) (page_mapcount(p) == 1)
|
|
#define can_share_swap_page(p) (page_mapcount(p) == 1)
|
|
|
|
|
|
static inline int move_to_swap_cache(struct page *page, swp_entry_t entry)
|
|
static inline int move_to_swap_cache(struct page *page, swp_entry_t entry)
|