patch-2.1.91 linux/include/linux/mm.h
Next file: linux/include/linux/netdevice.h
Previous file: linux/include/linux/miscdevice.h
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Thu Mar 26 14:54:53 1998
- Orig file:
v2.1.90/linux/include/linux/mm.h
- Orig date:
Tue Mar 10 10:03:35 1998
diff -u --recursive --new-file v2.1.90/linux/include/linux/mm.h linux/include/linux/mm.h
@@ -251,7 +251,23 @@
}
/* memory.c & swap.c*/
-extern int free_memory_available(void);
+
+/*
+ * This traverses "nr" memory size lists,
+ * and returns true if there is enough memory.
+ *
+ * For example, we want to keep on waking up
+ * kswapd every once in a while until the highest
+ * memory order has an entry (ie nr == 0), but
+ * we want to do it in the background.
+ *
+ * We want to do it in the foreground only if
+ * none of the three highest lists have enough
+ * memory. Random number.
+ */
+extern int free_memory_available(int nr);
+#define kswapd_continue() (!free_memory_available(3))
+#define kswapd_wakeup() (!free_memory_available(0))
#define free_page(addr) free_pages((addr),0)
extern void FASTCALL(free_pages(unsigned long addr, unsigned long order));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov