diff options
| author | oster <oster@NetBSD.org> | 2009-02-28 22:02:17 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2009-02-28 22:02:17 +0000 |
| commit | d7dbe2c6b82f33598b4c907f3f672eb4a26addce (patch) | |
| tree | 32c1ade290844edefb5ead7a1d6ba824facf7749 /sys/dev/raidframe | |
| parent | a7826a35b10b10546c9e010688b0cc58d960c30b (diff) | |
It seems that some SCSI drivers can block while the spinlock on a given
disk queue is being held. Work around this by dropping the lock before
bdev_strategy(), and re-grabbing the lock afterwards. This is a
temporary measure until I get to gutting this queue locking code.
There has been some success with this in addressing PR#39993.
This patch is from Antti Kantee. Thanks!
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 30b5e187c00..a599bf371d3 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.255 2009/02/07 20:36:49 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.256 2009/02/28 22:02:17 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -139,7 +139,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.255 2009/02/07 20:36:49 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.256 2009/02/28 22:02:17 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -2130,8 +2130,16 @@ rf_DispatchKernelIO(RF_DiskQueue_t *queue, RF_DiskQueueData_t *req) (int) (req->numSector << queue->raidPtr->logBytesPerSector), (int) queue->raidPtr->logBytesPerSector)); - bdev_strategy(bp); + /* + * XXX: drop lock here since this can block at + * least with backing SCSI devices. Retake it + * to minimize fuss with calling interfaces. + */ + + RF_UNLOCK_QUEUE_MUTEX(queue, "unusedparam"); + bdev_strategy(bp); + RF_LOCK_QUEUE_MUTEX(queue, "unusedparam"); break; default: |
