svn commit: r244410 - head/sys/dev/nvme
Jim Harris
jimharris at FreeBSD.org
Tue Dec 18 21:50:49 UTC 2012
Author: jimharris
Date: Tue Dec 18 21:50:48 2012
New Revision: 244410
URL: http://svnweb.freebsd.org/changeset/base/244410
Log:
Do not use taskqueue to defer completion work when using INTx. INTx now
matches MSI-X behavior.
Sponsored by: Intel
Modified:
head/sys/dev/nvme/nvme.c
head/sys/dev/nvme/nvme_ctrlr.c
head/sys/dev/nvme/nvme_private.h
Modified: head/sys/dev/nvme/nvme.c
==============================================================================
--- head/sys/dev/nvme/nvme.c Tue Dec 18 21:42:45 2012 (r244409)
+++ head/sys/dev/nvme/nvme.c Tue Dec 18 21:50:48 2012 (r244410)
@@ -298,11 +298,6 @@ nvme_detach (device_t dev)
struct nvme_namespace *ns;
int i;
- if (ctrlr->taskqueue) {
- taskqueue_drain(ctrlr->taskqueue, &ctrlr->task);
- taskqueue_free(ctrlr->taskqueue);
- }
-
for (i = 0; i < NVME_MAX_NAMESPACES; i++) {
ns = &ctrlr->ns[i];
if (ns->cdev)
Modified: head/sys/dev/nvme/nvme_ctrlr.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr.c Tue Dec 18 21:42:45 2012 (r244409)
+++ head/sys/dev/nvme/nvme_ctrlr.c Tue Dec 18 21:50:48 2012 (r244410)
@@ -619,10 +619,12 @@ err:
}
static void
-nvme_ctrlr_intx_task(void *arg, int pending)
+nvme_ctrlr_intx_handler(void *arg)
{
struct nvme_controller *ctrlr = arg;
+ nvme_mmio_write_4(ctrlr, intms, 1);
+
nvme_qpair_process_completions(&ctrlr->adminq);
if (ctrlr->ioq[0].cpl)
@@ -631,15 +633,6 @@ nvme_ctrlr_intx_task(void *arg, int pend
nvme_mmio_write_4(ctrlr, intmc, 1);
}
-static void
-nvme_ctrlr_intx_handler(void *arg)
-{
- struct nvme_controller *ctrlr = arg;
-
- nvme_mmio_write_4(ctrlr, intms, 1);
- taskqueue_enqueue_fast(ctrlr->taskqueue, &ctrlr->task);
-}
-
static int
nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr)
{
@@ -665,12 +658,6 @@ nvme_ctrlr_configure_intx(struct nvme_co
return (ENOMEM);
}
- TASK_INIT(&ctrlr->task, 0, nvme_ctrlr_intx_task, ctrlr);
- ctrlr->taskqueue = taskqueue_create_fast("nvme_taskq", M_NOWAIT,
- taskqueue_thread_enqueue, &ctrlr->taskqueue);
- taskqueue_start_threads(&ctrlr->taskqueue, 1, PI_NET,
- "%s intx taskq", device_get_nameunit(ctrlr->dev));
-
return (0);
}
Modified: head/sys/dev/nvme/nvme_private.h
==============================================================================
--- head/sys/dev/nvme/nvme_private.h Tue Dec 18 21:42:45 2012 (r244409)
+++ head/sys/dev/nvme/nvme_private.h Tue Dec 18 21:50:48 2012 (r244410)
@@ -36,7 +36,6 @@
#include <sys/mutex.h>
#include <sys/rman.h>
#include <sys/systm.h>
-#include <sys/taskqueue.h>
#include <vm/uma.h>
@@ -222,8 +221,6 @@ struct nvme_controller {
int rid;
struct resource *res;
void *tag;
- struct task task;
- struct taskqueue *taskqueue;
bus_dma_tag_t hw_desc_tag;
bus_dmamap_t hw_desc_map;
More information about the svn-src-all
mailing list