Re: BUG: spinlock lockup/wrong CPU/recursion -- when reading numa_mapson 2.6.17-rc1

From: Christoph Lameter
Date: Tue Apr 18 2006 - 14:08:26 EST


On Mon, 17 Apr 2006, Andrew Morton wrote:

> Yes, that's a bug and that cond_resched() needs to go.



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 <clameter@xxxxxxx>

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/