patch-2.1.90 linux/include/linux/swapctl.h

Next file: linux/include/linux/sysctl.h
Previous file: linux/include/linux/swap.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.89/linux/include/linux/swapctl.h linux/include/linux/swapctl.h
@@ -6,29 +6,18 @@
 
 /* Swap tuning control */
 
-/* First, enumerate the different reclaim policies */
-enum RCL_POLICY {RCL_ROUND_ROBIN, RCL_BUFF_FIRST, RCL_PERSIST};
-
-typedef struct swap_control_v5
+typedef struct swap_control_v6
 {
 	unsigned int	sc_max_page_age;
 	unsigned int	sc_page_advance;
 	unsigned int	sc_page_decline;
 	unsigned int	sc_page_initial_age;
-	unsigned int	sc_max_buff_age;
-	unsigned int	sc_buff_advance;
-	unsigned int	sc_buff_decline;
-	unsigned int	sc_buff_initial_age;
 	unsigned int	sc_age_cluster_fract;
 	unsigned int	sc_age_cluster_min;
 	unsigned int	sc_pageout_weight;
 	unsigned int	sc_bufferout_weight;
-	unsigned int 	sc_buffer_grace;
-	unsigned int 	sc_nr_buffs_to_free;
-	unsigned int 	sc_nr_pages_to_free;
-	enum RCL_POLICY	sc_policy;
-} swap_control_v5;
-typedef struct swap_control_v5 swap_control_t;
+} swap_control_v6;
+typedef struct swap_control_v6 swap_control_t;
 extern swap_control_t swap_control;
 
 typedef struct swapstat_v1
@@ -42,7 +31,23 @@
 typedef swapstat_v1 swapstat_t;
 extern swapstat_t swapstats;
 
-extern int min_free_pages, free_pages_low, free_pages_high;
+typedef struct buffer_mem_v1
+{
+	unsigned int	min_percent;
+	unsigned int	borrow_percent;
+	unsigned int	max_percent;
+} buffer_mem_v1;
+typedef buffer_mem_v1 buffer_mem_t;
+extern buffer_mem_t buffer_mem;
+
+typedef struct freepages_v1
+{
+	unsigned int	min;
+	unsigned int	low;
+	unsigned int	high;
+} freepages_v1;
+typedef freepages_v1 freepages_t;
+extern freepages_t freepages;
 
 #define SC_VERSION	1
 #define SC_MAX_VERSION	1
@@ -55,28 +60,17 @@
    failure to free a resource at any priority */
 #define RCL_FAILURE (RCL_MAXPRI + 1)
 
-#define RCL_POLICY		(swap_control.sc_policy)
 #define AGE_CLUSTER_FRACT	(swap_control.sc_age_cluster_fract)
 #define AGE_CLUSTER_MIN		(swap_control.sc_age_cluster_min)
 #define PAGEOUT_WEIGHT		(swap_control.sc_pageout_weight)
 #define BUFFEROUT_WEIGHT	(swap_control.sc_bufferout_weight)
 
-#define NR_BUFFS_TO_FREE	(swap_control.sc_nr_buffs_to_free)
-#define NR_PAGES_TO_FREE	(swap_control.sc_nr_pages_to_free)
-
-#define BUFFERMEM_GRACE		(swap_control.sc_buffer_grace)
-
 /* Page aging (see mm/swap.c) */
 
 #define MAX_PAGE_AGE		(swap_control.sc_max_page_age)
 #define PAGE_ADVANCE		(swap_control.sc_page_advance)
 #define PAGE_DECLINE		(swap_control.sc_page_decline)
 #define PAGE_INITIAL_AGE	(swap_control.sc_page_initial_age)
-
-#define MAX_BUFF_AGE		(swap_control.sc_max_buff_age)
-#define BUFF_ADVANCE		(swap_control.sc_buff_advance)
-#define BUFF_DECLINE		(swap_control.sc_buff_decline)
-#define BUFF_INITIAL_AGE	(swap_control.sc_buff_initial_age)
 
 /* Given a resource of N units (pages or buffers etc), we only try to
  * age and reclaim AGE_CLUSTER_FRACT per 1024 resources each time we

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