svn commit: r254377 - projects/camlock/sys/cam
Alexander Motin
mav at FreeBSD.org
Thu Aug 15 19:46:32 UTC 2013
Author: mav
Date: Thu Aug 15 19:46:31 2013
New Revision: 254377
URL: http://svnweb.freebsd.org/changeset/base/254377
Log:
Remove remnants of per-device periph allocation queues.
It was axed out during previous locking attempt and theoretically could
be restored now, but since we removed per-SIM allocation queue for good,
it gives quite small real benefit to recomplicate things again.
Modified:
projects/camlock/sys/cam/cam_xpt.c
projects/camlock/sys/cam/cam_xpt_internal.h
Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c Thu Aug 15 19:32:08 2013 (r254376)
+++ projects/camlock/sys/cam/cam_xpt.c Thu Aug 15 19:46:31 2013 (r254377)
@@ -987,14 +987,6 @@ xpt_add_periph(struct cam_periph *periph
device = periph->path->device;
status = CAM_REQ_CMP;
if (device != NULL) {
- /*
- * Make room for this peripheral
- * so it will fit in the queue
- * when it's scheduled to run
- */
- status = camq_resize(&device->drvq,
- device->drvq.array_size + 1);
-
mtx_lock(&device->target->bus->eb_mtx);
device->generation++;
SLIST_INSERT_HEAD(&device->periphs, periph, periph_links);
@@ -1011,9 +1003,6 @@ xpt_remove_periph(struct cam_periph *per
device = periph->path->device;
if (device != NULL) {
- /* Release the slot for this peripheral */
- camq_resize(&device->drvq, device->drvq.array_size - 1);
-
mtx_lock(&device->target->bus->eb_mtx);
device->generation++;
SLIST_REMOVE(&device->periphs, periph, cam_periph, periph_links);
@@ -4630,14 +4619,8 @@ xpt_alloc_device(struct cam_eb *bus, str
device->target = target;
device->lun_id = lun_id;
device->sim = bus->sim;
- /* Initialize our queues */
- if (camq_init(&device->drvq, 0) != 0) {
- free(device, M_CAMDEV);
- return (NULL);
- }
if (cam_ccbq_init(&device->ccbq,
bus->sim->max_dev_openings) != 0) {
- camq_fini(&device->drvq);
free(device, M_CAMDEV);
return (NULL);
}
@@ -4710,7 +4693,6 @@ xpt_release_device(struct cam_ed *device
xpt_release_target(device->target);
- camq_fini(&device->drvq);
cam_ccbq_fini(&device->ccbq);
/*
* Free allocated memory. free(9) does nothing if the
Modified: projects/camlock/sys/cam/cam_xpt_internal.h
==============================================================================
--- projects/camlock/sys/cam/cam_xpt_internal.h Thu Aug 15 19:32:08 2013 (r254376)
+++ projects/camlock/sys/cam/cam_xpt_internal.h Thu Aug 15 19:46:31 2013 (r254377)
@@ -77,10 +77,6 @@ struct cam_ed {
struct cam_et *target;
struct cam_sim *sim;
lun_id_t lun_id;
- struct camq drvq; /*
- * Queue of type drivers wanting to do
- * work on this device.
- */
struct cam_ccbq ccbq; /* Queue of pending ccbs */
struct async_list asyncs; /* Async callback info for this B/T/L */
struct periph_list periphs; /* All attached devices */
More information about the svn-src-projects
mailing list