patch-2.1.91 linux/include/linux/swap.h

Next file: linux/include/linux/swapctl.h
Previous file: linux/include/linux/socket.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.90/linux/include/linux/swap.h linux/include/linux/swap.h
@@ -39,7 +39,6 @@
 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;
@@ -120,6 +119,21 @@
 	if (PageFreeAfter(page))
 		count--;
 	return (count > 1);
+}
+
+/*
+ * 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;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov