Remove cond_resched in gather_stats() gather_stats() is called with a spinlock held from check_pte_range. We cannot reschedule with a lock held. Signed-off-by: Christoph Lameter Index: linux-2.6.17-rc1-mm3/mm/mempolicy.c =================================================================== --- linux-2.6.17-rc1-mm3.orig/mm/mempolicy.c 2006-04-18 10:58:33.000000000 -0700 +++ linux-2.6.17-rc1-mm3/mm/mempolicy.c 2006-04-18 10:59:56.000000000 -0700 @@ -1761,7 +1761,6 @@ static void gather_stats(struct page *pa md->mapcount_max = count; md->node[page_to_nid(page)]++; - cond_resched(); } #ifdef CONFIG_HUGETLB_PAGE