patch-2.1.126 linux/include/linux/mm.h

Next file: linux/include/linux/nfsd/export.h
Previous file: linux/include/linux/mca.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/include/linux/mm.h linux/include/linux/mm.h
@@ -380,6 +380,36 @@
 	return vma;
 }
 
+extern __inline__ void kswapd_wakeup(void)
+{
+	wake_up(&kswapd_wait);
+}
+
+#define buffer_under_min()	((buffermem >> PAGE_SHIFT) * 100 < \
+				buffer_mem.min_percent * num_physpages)
+#define buffer_under_borrow()	((buffermem >> PAGE_SHIFT) * 100 < \
+				buffer_mem.borrow_percent * num_physpages)
+#define buffer_under_max()	((buffermem >> PAGE_SHIFT) * 100 < \
+				buffer_mem.max_percent * num_physpages)
+#define buffer_over_min()	((buffermem >> PAGE_SHIFT) * 100 > \
+				buffer_mem.min_percent * num_physpages)
+#define buffer_over_borrow()	((buffermem >> PAGE_SHIFT) * 100 > \
+				buffer_mem.borrow_percent * num_physpages)
+#define buffer_over_max()	((buffermem >> PAGE_SHIFT) * 100 > \
+				buffer_mem.max_percent * num_physpages)
+#define pgcache_under_min()	(page_cache_size * 100 < \
+				page_cache.min_percent * num_physpages)
+#define pgcache_under_borrow()	(page_cache_size * 100 < \
+				page_cache.borrow_percent * num_physpages)
+#define pgcache_under_max()	(page_cache_size * 100 < \
+				page_cache.max_percent * num_physpages)
+#define pgcache_over_min()	(page_cache_size * 100 > \
+				page_cache.min_percent * num_physpages)
+#define pgcache_over_borrow()	(page_cache_size * 100 > \
+				page_cache.borrow_percent * num_physpages)
+#define pgcache_over_max()	(page_cache_size * 100 > \
+				page_cache.max_percent * num_physpages)
+
 #endif /* __KERNEL__ */
 
 #endif

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