Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jdolecek-ncq]: src/sys/dev/ata make atastart() schedule as many commands...
details: https://anonhg.NetBSD.org/src/rev/98f52d826312
branches: jdolecek-ncq
changeset: 352736:98f52d826312
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Aug 01 21:41:25 2017 +0000
description:
make atastart() schedule as many commands as possible, instead of always
only one; makes it able to pick up pace again after processing non-NCQ command
diffstat:
sys/dev/ata/ata.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r aa6a36f43c52 -r 98f52d826312 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Tue Aug 01 21:39:51 2017 +0000
+++ b/sys/dev/ata/ata.c Tue Aug 01 21:41:25 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.132.8.23 2017/08/01 21:39:51 jdolecek Exp $ */
+/* $NetBSD: ata.c,v 1.132.8.24 2017/08/01 21:41:25 jdolecek Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.23 2017/08/01 21:39:51 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.132.8.24 2017/08/01 21:41:25 jdolecek Exp $");
#include "opt_ata.h"
@@ -1240,6 +1240,7 @@
splx(spl1);
#endif /* ATA_DEBUG */
+again:
mutex_enter(&chp->ch_lock);
KASSERT(chq->queue_active <= chq->queue_openings);
@@ -1318,6 +1319,11 @@
* routine for polled commands.
*/
xfer->c_start(chp, xfer);
+
+ /* Queue more commands if possible */
+ if (chq->queue_active < chq->queue_openings)
+ goto again;
+
return;
out:
Home |
Main Index |
Thread Index |
Old Index