Index: linux-2.6.16-rc5/mm/vmscan.c =================================================================== --- linux-2.6.16-rc5.orig/mm/vmscan.c 2006-02-27 12:20:35.000000000 -0800 +++ linux-2.6.16-rc5/mm/vmscan.c 2006-02-27 12:20:44.000000000 -0800 @@ -928,14 +928,18 @@ redo: newpage = lru_to_page(to); lock_page(newpage); + printk(KERN_ERR "Migrating %p (node %ld)->%p (node %ld)\n", page, page_to_nid(page), + newpage, page_to_nid(newpage)); /* * Pages are properly locked and writeback is complete. * Try to migrate the page. */ mapping = page_mapping(page); - if (!mapping) + if (!mapping) { + printk("No mapping\n"); goto unlock_both; + } if (mapping->a_ops->migratepage) { /* @@ -945,6 +949,7 @@ redo: * own migration function. This is the most common * path for page migration. */ + printk("Using Migration function %p\n", mapping->a_ops->migratepage); rc = mapping->a_ops->migratepage(newpage, page); goto unlock_both; } @@ -955,13 +960,16 @@ redo: * pages so try to write out any dirty pages first. */ if (PageDirty(page)) { + printk("Page Dirty.\n"); switch (pageout(page, mapping)) { case PAGE_KEEP: case PAGE_ACTIVATE: + printk("Pageout says keep page\n"); goto unlock_both; case PAGE_SUCCESS: unlock_page(newpage); + printk("Pageout success but it unlocked\n"); goto next; case PAGE_CLEAN: @@ -975,6 +983,7 @@ redo: */ if (!page_has_buffers(page) || try_to_release_page(page, GFP_KERNEL)) { + printk("Default migration function.\n"); rc = migrate_page(newpage, page); goto unlock_both; } @@ -993,6 +1002,7 @@ redo: */ unlock_page(newpage); newpage = NULL; + printk("Fall back to swap\n"); rc = swap_page(page); goto next; } @@ -1004,18 +1014,22 @@ unlock_page: unlock_page(page); next: + printk("End %p\n",page); if (rc == -EAGAIN) { + printk("* Need to retry page %p\n",page); retry++; } else if (rc) { /* Permanent failure */ list_move(&page->lru, failed); nr_failed++; + printk("* Permanent failure on %p\n",page); } else { if (newpage) { /* Successful migration. Return page to LRU */ move_to_lru(newpage); } list_move(&page->lru, moved); + printk("* Successfully migrated %p\n",page); } } if (retry && pass++ < 10) Index: linux-2.6.16-rc5/mm/mempolicy.c =================================================================== --- linux-2.6.16-rc5.orig/mm/mempolicy.c 2006-02-27 12:20:29.000000000 -0800 +++ linux-2.6.16-rc5/mm/mempolicy.c 2006-02-27 12:20:44.000000000 -0800 @@ -638,6 +638,7 @@ int migrate_to_node(struct mm_struct *mm LIST_HEAD(pagelist); int err = 0; + printk(KERN_ERR "--Migrating pages from node %d to %d\n", source, dest); nodes_clear(nmask); node_set(source, nmask); Index: linux-2.6.16-rc5/fs/buffer.c =================================================================== --- linux-2.6.16-rc5.orig/fs/buffer.c 2006-02-27 12:20:35.000000000 -0800 +++ linux-2.6.16-rc5/fs/buffer.c 2006-02-27 12:20:44.000000000 -0800 @@ -2029,6 +2029,7 @@ static int __block_commit_write(struct i int partial = 0; unsigned blocksize; struct buffer_head *bh, *head; + int rc; blocksize = 1 << inode->i_blkbits;