From owner-svn-src-projects@FreeBSD.ORG Thu Aug 15 19:46:31 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1CB845A; Thu, 15 Aug 2013 19:46:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5D6925CE; Thu, 15 Aug 2013 19:46:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FJkVjZ083196; Thu, 15 Aug 2013 19:46:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FJkVVf083194; Thu, 15 Aug 2013 19:46:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308151946.r7FJkVVf083194@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Aug 2013 19:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r254377 - projects/camlock/sys/cam X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 19:46:32 -0000 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 */