patch-2.4.23 linux-2.4.23/include/linux/swap.h
Next file: linux-2.4.23/include/linux/sysctl.h
Previous file: linux-2.4.23/include/linux/sunrpc/xprt.h
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/include/linux/swap.h
- Orig date:
2003-08-25 04:44:44.000000000 -0700
diff -urN linux-2.4.22/include/linux/swap.h linux-2.4.23/include/linux/swap.h
@@ -87,7 +87,7 @@
extern unsigned int nr_free_buffer_pages(void);
extern int nr_active_pages;
extern int nr_inactive_pages;
-extern atomic_t page_cache_size;
+extern unsigned long page_cache_size;
extern atomic_t buffermem_pages;
extern spinlock_cacheline_t pagecache_lock_cacheline;
@@ -115,6 +115,7 @@
extern wait_queue_head_t kswapd_wait;
extern int FASTCALL(try_to_free_pages_zone(zone_t *, unsigned int));
extern int FASTCALL(try_to_free_pages(unsigned int));
+extern int vm_vfs_scan_ratio, vm_cache_scan_ratio, vm_lru_balance_ratio, vm_passes, vm_gfp_debug, vm_mapped_ratio;
/* linux/mm/page_io.c */
extern void rw_swap_page(int, struct page *);
@@ -175,34 +176,46 @@
BUG(); \
} while (0)
+extern void delta_nr_active_pages(struct page *page, long delta);
+#define inc_nr_active_pages(page) delta_nr_active_pages(page, 1)
+#define dec_nr_active_pages(page) delta_nr_active_pages(page, -1)
+
+extern void delta_nr_inactive_pages(struct page *page, long delta);
+#define inc_nr_inactive_pages(page) delta_nr_inactive_pages(page, 1)
+#define dec_nr_inactive_pages(page) delta_nr_inactive_pages(page, -1)
+
#define add_page_to_active_list(page) \
do { \
DEBUG_LRU_PAGE(page); \
SetPageActive(page); \
list_add(&(page)->lru, &active_list); \
- nr_active_pages++; \
+ inc_nr_active_pages(page); \
} while (0)
#define add_page_to_inactive_list(page) \
do { \
DEBUG_LRU_PAGE(page); \
list_add(&(page)->lru, &inactive_list); \
- nr_inactive_pages++; \
+ inc_nr_inactive_pages(page); \
} while (0)
#define del_page_from_active_list(page) \
do { \
list_del(&(page)->lru); \
ClearPageActive(page); \
- nr_active_pages--; \
+ dec_nr_active_pages(page); \
} while (0)
#define del_page_from_inactive_list(page) \
do { \
list_del(&(page)->lru); \
- nr_inactive_pages--; \
+ dec_nr_inactive_pages(page); \
} while (0)
+extern void delta_nr_cache_pages(struct page *page, long delta);
+#define inc_nr_cache_pages(page) delta_nr_cache_pages(page, 1)
+#define dec_nr_cache_pages(page) delta_nr_cache_pages(page, -1)
+
extern spinlock_t swaplock;
#define swap_list_lock() spin_lock(&swaplock)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)