summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-05-12 13:55:36 +0000
committermav <mav@FreeBSD.org>2012-05-12 13:55:36 +0000
commit693ceab23e831ec3a19ac0daa29f797e2596fb93 (patch)
treed0c5e4b9d4ea67d48c8380b39bd48b3506eb73a4 /sys/dev
parent6a6a18bf5cd7caebec476234cbf2b10a703e7716 (diff)
downloadFreeBSD-src-693ceab23e831ec3a19ac0daa29f797e2596fb93.zip
FreeBSD-src-693ceab23e831ec3a19ac0daa29f797e2596fb93.tar.gz
Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI
to allow drivers to handle request completion directly without passing them to the CAM SWI thread removing extra context switch. Modify all ATA/SATA drivers to use them. Reviewed by: gibbs, ken MFC after: 2 weeks
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ahci/ahci.c2
-rw-r--r--sys/dev/ata/ata-all.c2
-rw-r--r--sys/dev/mvs/mvs.c2
-rw-r--r--sys/dev/siis/siis.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index c355736..796dc33 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -1457,7 +1457,9 @@ ahci_ch_intr_locked(void *data)
struct ahci_channel *ch = device_get_softc(dev);
mtx_lock(&ch->mtx);
+ xpt_batch_start(ch->sim);
ahci_ch_intr(data);
+ xpt_batch_done(ch->sim);
mtx_unlock(&ch->mtx);
}
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 9ea25c0..3caad01 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -544,9 +544,11 @@ ata_interrupt(void *data)
struct ata_channel *ch = (struct ata_channel *)data;
mtx_lock(&ch->state_mtx);
+ xpt_batch_start(ch->sim);
#endif
ata_interrupt_locked(data);
#ifdef ATA_CAM
+ xpt_batch_done(ch->sim);
mtx_unlock(&ch->state_mtx);
#endif
}
diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c
index e128616..debe55a 100644
--- a/sys/dev/mvs/mvs.c
+++ b/sys/dev/mvs/mvs.c
@@ -654,7 +654,9 @@ mvs_ch_intr_locked(void *data)
struct mvs_channel *ch = device_get_softc(dev);
mtx_lock(&ch->mtx);
+ xpt_batch_start(ch->sim);
mvs_ch_intr(data);
+ xpt_batch_done(ch->sim);
mtx_unlock(&ch->mtx);
}
diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c
index 17c1a39..2b709cd 100644
--- a/sys/dev/siis/siis.c
+++ b/sys/dev/siis/siis.c
@@ -830,7 +830,9 @@ siis_ch_intr_locked(void *data)
struct siis_channel *ch = device_get_softc(dev);
mtx_lock(&ch->mtx);
+ xpt_batch_start(ch->sim);
siis_ch_intr(data);
+ xpt_batch_done(ch->sim);
mtx_unlock(&ch->mtx);
}
OpenPOWER on IntegriCloud