Binary files vm-ref/ID and vm/ID differ diff -urN vm-ref/include/linux/mmzone.h vm/include/linux/mmzone.h --- vm-ref/include/linux/mmzone.h Sun Nov 18 07:45:06 2001 +++ vm/include/linux/mmzone.h Sun Nov 18 07:38:10 2001 @@ -67,8 +67,6 @@ unsigned long need_balance; /* protected by the pagemap_lru_lock */ unsigned long nr_active_pages, nr_inactive_pages; - /* protected by the pagecache_lock */ - unsigned long nr_cache_pages; /* * free areas of different sizes diff -urN vm-ref/include/linux/pagemap.h vm/include/linux/pagemap.h --- vm-ref/include/linux/pagemap.h Sun Nov 18 07:45:06 2001 +++ vm/include/linux/pagemap.h Sun Nov 18 07:44:36 2001 @@ -45,7 +45,7 @@ #define PAGE_HASH_BITS (page_hash_bits) #define PAGE_HASH_SIZE (1 << PAGE_HASH_BITS) -extern unsigned long page_cache_size; /* # of pages currently in the hash table */ +extern volatile unsigned long page_cache_size; /* # of pages currently in the hash table */ extern struct page **page_hash_table; extern void page_cache_init(unsigned long); diff -urN vm-ref/include/linux/swap.h vm/include/linux/swap.h --- vm-ref/include/linux/swap.h Sun Nov 18 07:45:06 2001 +++ vm/include/linux/swap.h Sun Nov 18 07:44:31 2001 @@ -88,7 +88,6 @@ extern int nr_active_pages; extern int nr_inactive_pages; extern atomic_t nr_async_pages; -extern unsigned long page_cache_size; extern atomic_t buffermem_pages; extern spinlock_cacheline_t pagecache_lock_cacheline; @@ -272,38 +271,6 @@ list_del(&(page)->lru); \ dec_nr_inactive_pages(page); \ DEBUG_LRU_PAGE(page); \ -} while (0) - -#define inc_nr_cache_pages(page) \ -do { \ - pg_data_t * __pgdat; \ - zone_t * __classzone, * __overflow; \ - \ - __classzone = (page)->zone; \ - __pgdat = __classzone->zone_pgdat; \ - __overflow = __pgdat->node_zones + __pgdat->nr_zones; \ - \ - while (__classzone < __overflow) { \ - __classzone->nr_cache_pages++; \ - __classzone++; \ - } \ - page_cache_size++; \ -} while (0) - -#define dec_nr_cache_pages(page) \ -do { \ - pg_data_t * __pgdat; \ - zone_t * __classzone, * __overflow; \ - \ - __classzone = (page)->zone; \ - __pgdat = __classzone->zone_pgdat; \ - __overflow = __pgdat->node_zones + __pgdat->nr_zones; \ - \ - while (__classzone < __overflow) { \ - __classzone->nr_cache_pages--; \ - __classzone++; \ - } \ - page_cache_size--; \ } while (0) extern spinlock_t swaplock; diff -urN vm-ref/mm/filemap.c vm/mm/filemap.c --- vm-ref/mm/filemap.c Sun Nov 18 07:45:07 2001 +++ vm/mm/filemap.c Sun Nov 18 07:42:07 2001 @@ -42,7 +42,7 @@ * SMP-threaded pagemap-LRU 1999, Andrea Arcangeli */ -unsigned long page_cache_size; +volatile unsigned long page_cache_size; unsigned int page_hash_bits; struct page **page_hash_table; @@ -74,7 +74,7 @@ next->pprev_hash = &page->next_hash; if (page->buffers) PAGE_BUG(page); - inc_nr_cache_pages(page); + page_cache_size++; } static inline void add_page_to_inode_queue(struct address_space *mapping, struct page * page) @@ -104,7 +104,7 @@ next->pprev_hash = pprev; *pprev = next; page->pprev_hash = NULL; - dec_nr_cache_pages(page); + page_cache_size--; } /* diff -urN vm-ref/mm/page_alloc.c vm/mm/page_alloc.c --- vm-ref/mm/page_alloc.c Sun Nov 18 07:45:06 2001 +++ vm/mm/page_alloc.c Sun Nov 18 07:42:35 2001 @@ -532,7 +532,7 @@ zone = *zonep; class_idx = zone_idx(zone); - sum += zone->nr_cache_pages; + sum += zone->nr_inactive_pages; do { unsigned int free = zone->free_pages - zone->watermarks[class_idx].high; zonep++;