summaryrefslogtreecommitdiffstats
path: root/include/linux/swap.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
commit4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch)
treecddb50a81d7d1a628cc400519162080c6d87868e /include/linux/swap.h
parent36ea5120664550fae6d31f1c6f695e4f8975cb06 (diff)
o Merge with Linux 2.1.91.
o First round of bugfixes for the SC/MC CPUs. o FPU context switch fixes. o Lazy context switches. o Faster syscalls. o Removed dead code. o Shitloads of other things I forgot ...
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r--include/linux/swap.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 494490c32..48a0ca02c 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -39,7 +39,6 @@ extern atomic_t nr_async_pages;
extern struct inode swapper_inode;
extern unsigned long page_cache_size;
extern int buffermem;
-#define BUFFER_MEM ((buffermem >> PAGE_SHIFT) + page_cache_size)
/* Incomplete types for prototype declarations: */
struct task_struct;
@@ -123,6 +122,21 @@ static inline int is_page_shared(struct page *page)
}
/*
+ * When we're freeing pages from a user application, we want
+ * to cluster swapouts too. -- Rik.
+ * linux/mm/page_alloc.c
+ */
+static inline int try_to_free_pages(int gfp_mask, int count)
+{
+ int retval = 0;
+ while (count--) {
+ if (try_to_free_page(gfp_mask))
+ retval = 1;
+ }
+ return retval;
+}
+
+/*
* Make these inline later once they are working properly.
*/
extern long find_in_swap_cache(struct page *page);