Index: linux-2.6.15-rc5-mm3/Makefile =================================================================== --- linux-2.6.15-rc5-mm3.orig/Makefile 2005-12-16 11:44:09.000000000 -0800 +++ linux-2.6.15-rc5-mm3/Makefile 2005-12-19 20:37:31.000000000 -0800 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 15 -EXTRAVERSION =-rc5-mm3 +EXTRAVERSION =-rc5-mm3-d NAME=Affluent Albatross # *DOCUMENTATION* Index: linux-2.6.15-rc5-mm3/fs/buffer.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/fs/buffer.c 2005-12-19 13:43:12.000000000 -0800 +++ linux-2.6.15-rc5-mm3/fs/buffer.c 2005-12-19 20:37:31.000000000 -0800 @@ -1546,7 +1546,6 @@ static inline void discard_buffer(struct clear_buffer_dirty(bh); bh->b_bdev = NULL; clear_buffer_uptodate(bh); - WARN_ON(bh->b_page && PageUptodate(bh->b_page)); clear_buffer_mapped(bh); clear_buffer_req(bh); clear_buffer_new(bh); Index: linux-2.6.15-rc5-mm3/mm/vmscan.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/mm/vmscan.c 2005-12-19 20:37:29.000000000 -0800 +++ linux-2.6.15-rc5-mm3/mm/vmscan.c 2005-12-19 20:41:28.000000000 -0800 @@ -230,7 +230,7 @@ int shrink_slab(unsigned long scanned, g (nr_before - shrink_ret)); } shrinker_stat_add(shrinker, nr_req, this_scan); - mod_page_state(slabs_scanned, this_scan); + count_events(SLABS_SCANNED, this_scan); total_scan -= this_scan; cond_resched(); @@ -572,7 +572,7 @@ keep: list_splice(&ret_pages, page_list); if (pagevec_count(&freed_pvec)) __pagevec_release_nonlru(&freed_pvec); - couint_events(PGPACTIVATE, pgactivate); + count_events(PGACTIVATE, pgactivate); sc->nr_reclaimed += reclaimed; return reclaimed; } @@ -1187,7 +1187,7 @@ int try_to_free_pages(struct zone **zone sc.may_writepage = 0; sc.may_swap = 1; - inc_page_state(allocstall); + count_event(ALLOCSTALL); for (i = 0; zones[i] != NULL; i++) { struct zone *zone = zones[i]; @@ -1291,7 +1291,7 @@ loop_again: sc.may_swap = 1; sc.nr_mapped = global_page_state(NR_MAPPED); - inc_page_state(pageoutrun); + count_event(PAGEOUTRUN); for (i = 0; i < pgdat->nr_zones; i++) { struct zone *zone = pgdat->node_zones + i; @@ -1616,6 +1616,10 @@ int zone_reclaim(struct zone *zone, gfp_ * Check if there is a reasonable amount of recoverable memory before * doing the scan. */ + + printk(KERN_ERR "zone_reclaim PAGECACHE=%ld MAPPED=%ld nr_pages=%ld\n", + zone_page_state(zone, NR_PAGECACHE), zone_page_state(zone, NR_MAPPED), nr_pages); + if (zone_page_state(zone, NR_PAGECACHE) <= zone_page_state(zone, NR_MAPPED) + nr_pages) return 0; @@ -1639,6 +1643,7 @@ int zone_reclaim(struct zone *zone, gfp_ p->reclaim_state = NULL; current->flags &= ~PF_MEMALLOC; cond_resched(); + printk(KERN_ERR "Reclaimed %ld pages\n", sc.nr_reclaimed); return sc.nr_reclaimed >= (1 << order); } #endif Index: linux-2.6.15-rc5-mm3/mm/swap.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/mm/swap.c 2005-12-16 11:44:09.000000000 -0800 +++ linux-2.6.15-rc5-mm3/mm/swap.c 2005-12-19 20:39:59.000000000 -0800 @@ -85,7 +85,7 @@ int rotate_reclaimable_page(struct page if (PageLRU(page) && !PageActive(page)) { list_del(&page->lru); list_add_tail(&page->lru, &zone->inactive_list); - inc_page_state(pgrotated); + count_event(PGROTATED); } if (!test_clear_page_writeback(page)) BUG(); @@ -105,7 +105,7 @@ void fastcall activate_page(struct page del_page_from_inactive_list(zone, page); SetPageActive(page); add_page_to_active_list(zone, page); - inc_page_state(pgactivate); + count_event(PGACTIVATE); } spin_unlock_irq(&zone->lru_lock); } Index: linux-2.6.15-rc5-mm3/mm/filemap.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/mm/filemap.c 2005-12-19 13:43:00.000000000 -0800 +++ linux-2.6.15-rc5-mm3/mm/filemap.c 2005-12-19 20:38:49.000000000 -0800 @@ -1283,7 +1283,7 @@ retry_find: */ if (!did_readaround) { majmin = VM_FAULT_MAJOR; - inc_page_state(pgmajfault); + count_event(PGMAJFAULT); } did_readaround = 1; ra_pages = max_sane_readahead(file->f_ra.ra_pages); @@ -1354,7 +1354,7 @@ no_cached_page: page_not_uptodate: if (!did_readaround) { majmin = VM_FAULT_MAJOR; - inc_page_state(pgmajfault); + count_event(PGMAJFAULT); } lock_page(page); Index: linux-2.6.15-rc5-mm3/mm/page_io.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/mm/page_io.c 2005-12-03 21:10:42.000000000 -0800 +++ linux-2.6.15-rc5-mm3/mm/page_io.c 2005-12-19 20:44:06.000000000 -0800 @@ -101,7 +101,7 @@ int swap_writepage(struct page *page, st } if (wbc->sync_mode == WB_SYNC_ALL) rw |= (1 << BIO_RW_SYNC); - inc_page_state(pswpout); + count_event(PSWPOUT); set_page_writeback(page); unlock_page(page); submit_bio(rw, bio); @@ -123,7 +123,7 @@ int swap_readpage(struct file *file, str ret = -ENOMEM; goto out; } - inc_page_state(pswpin); + count_event(PSWPIN); submit_bio(READ, bio); out: return ret; Index: linux-2.6.15-rc5-mm3/mm/memory.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/mm/memory.c 2005-12-19 13:43:10.000000000 -0800 +++ linux-2.6.15-rc5-mm3/mm/memory.c 2005-12-19 20:42:35.000000000 -0800 @@ -1887,7 +1887,7 @@ static int do_swap_page(struct mm_struct /* Had to read the page from swap area: Major fault */ ret = VM_FAULT_MAJOR; - inc_page_state(pgmajfault); + count_event(PGMAJFAULT); grab_swap_token(); } @@ -2247,7 +2247,7 @@ int __handle_mm_fault(struct mm_struct * __set_current_state(TASK_RUNNING); - inc_page_state(pgfault); + count_event(PGFAULT); if (unlikely(is_vm_hugetlb_page(vma))) return hugetlb_fault(mm, vma, address, write_access); Index: linux-2.6.15-rc5-mm3/fs/inode.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/fs/inode.c 2005-12-16 11:44:08.000000000 -0800 +++ linux-2.6.15-rc5-mm3/fs/inode.c 2005-12-19 20:43:17.000000000 -0800 @@ -462,9 +462,9 @@ static void prune_icache(int nr_to_scan) up(&iprune_sem); if (current_is_kswapd()) - mod_page_state(kswapd_inodesteal, reap); + count_events(KSWAPD_INODESTEAL, reap); else - mod_page_state(pginodesteal, reap); + count_events(PGINODESTEAL, reap); } /* Index: linux-2.6.15-rc5-mm3/mm/shmem.c =================================================================== --- linux-2.6.15-rc5-mm3.orig/mm/shmem.c 2005-12-16 11:44:09.000000000 -0800 +++ linux-2.6.15-rc5-mm3/mm/shmem.c 2005-12-19 20:44:45.000000000 -0800 @@ -996,7 +996,7 @@ repeat: spin_unlock(&info->lock); /* here we actually do the io */ if (type && *type == VM_FAULT_MINOR) { - inc_page_state(pgmajfault); + count_event(PGMAJFAULT); *type = VM_FAULT_MAJOR; } swappage = shmem_swapin(info, swap, idx);