Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha The tlb shootdown IPI can interrupt the...
details: https://anonhg.NetBSD.org/src/rev/a6d45613ce02
branches: trunk
changeset: 748885:a6d45613ce02
user: mhitch <mhitch%NetBSD.org@localhost>
date: Mon Nov 09 04:31:03 2009 +0000
description:
The tlb shootdown IPI can interrupt the pool_cache_get() in places that
can cause a deadlock or pool cache corruption. Take the shootdown job
queue mutex before calling pool_cache_get(), which will block the IPI
interrupts and seems to fix the remaining tlb shootdown deadlocks and
pool cache corruption I've been seeing. Should address both
PR port-amiga/38335 and PR port-amiga/42174.
diffstat:
sys/arch/alpha/alpha/pmap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 7ce4ef994378 -r a6d45613ce02 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Mon Nov 09 04:13:23 2009 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Mon Nov 09 04:31:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.249 2009/11/07 07:27:40 cegger Exp $ */
+/* $NetBSD: pmap.c,v 1.250 2009/11/09 04:31:03 mhitch Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc.
@@ -140,7 +140,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.249 2009/11/07 07:27:40 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.250 2009/11/09 04:31:03 mhitch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3581,6 +3581,7 @@
cpumask |= 1UL << ci->ci_cpuid;
pq = &pmap_tlb_shootdown_q[ci->ci_cpuid];
+ mutex_spin_enter(&pq->pq_lock);
/*
* Allocate a job.
@@ -3596,7 +3597,6 @@
* If a global flush is already pending, we
* don't really have to do anything else.
*/
- mutex_spin_enter(&pq->pq_lock);
pq->pq_pte |= pte;
if (pq->pq_tbia) {
mutex_spin_exit(&pq->pq_lock);
Home |
Main Index |
Thread Index |
Old Index