diff options
author | sos <sos@FreeBSD.org> | 2004-01-28 20:38:51 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2004-01-28 20:38:51 +0000 |
commit | 3678d31f1762251640dd504e43143335331df1d0 (patch) | |
tree | 833f15df3b8efaf179e15bbcbea2cc190bd43c96 /sys/dev/ata/ata-lowlevel.c | |
parent | 45e377d906380622fc58dbee7caa00d93d2e80e8 (diff) | |
download | FreeBSD-src-3678d31f1762251640dd504e43143335331df1d0.zip FreeBSD-src-3678d31f1762251640dd504e43143335331df1d0.tar.gz |
Use the biotask functionality in GEOM to put finished requests on
instead of taskqueue_swi. This shaves from 1 to 10% of the overhead.
Overhaul the locking once more, there was a few possible races that
are now closed.
Diffstat (limited to 'sys/dev/ata/ata-lowlevel.c')
-rw-r--r-- | sys/dev/ata/ata-lowlevel.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c index 67ed3d1..740f5b7 100644 --- a/sys/dev/ata/ata-lowlevel.c +++ b/sys/dev/ata/ata-lowlevel.c @@ -359,6 +359,9 @@ ata_interrupt(void *data) min((request->bytecount - request->donecount), request->transfersize); + /* clear interrupt seen flag as we need to wait again */ + request->flags &= ~ATA_R_INTR_SEEN; + /* if data write command, output the data */ if (request->flags & ATA_R_WRITE) { @@ -510,19 +513,15 @@ ata_interrupt(void *data) break; } - /* if we timed out, we hold on to the channel, ata_reinit() will unlock */ - if (request->flags & ATA_R_TIMEOUT) { - ata_finish(request); - return; + /* if we timed out the unlocking of the ATA channel is done later */ + if (!(request->flags & ATA_R_TIMEOUT)) { + ch->running = NULL; + ATA_UNLOCK_CH(ch); + ch->locking(ch, ATA_LF_UNLOCK); } /* schedule completition for this request */ ata_finish(request); - - /* unlock the ATA channel for new work */ - ch->running = NULL; - ATA_UNLOCK_CH(ch); - ch->locking(ch, ATA_LF_UNLOCK); } /* must be called with ATA channel locked */ |