From owner-svn-src-stable@FreeBSD.ORG Tue Nov 17 15:08:02 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C7BD106568B; Tue, 17 Nov 2009 15:08:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A8F58FC13; Tue, 17 Nov 2009 15:08:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHF82QH015470; Tue, 17 Nov 2009 15:08:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHF82lN015468; Tue, 17 Nov 2009 15:08:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911171508.nAHF82lN015468@svn.freebsd.org> From: Alexander Motin Date: Tue, 17 Nov 2009 15:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199388 - stable/8/sys/cam X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 15:08:02 -0000 Author: mav Date: Tue Nov 17 15:08:01 2009 New Revision: 199388 URL: http://svn.freebsd.org/changeset/base/199388 Log: MFC r198333: Do not search for bus when it is not needed. Modified: stable/8/sys/cam/cam_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Tue Nov 17 15:04:58 2009 (r199387) +++ stable/8/sys/cam/cam_xpt.c Tue Nov 17 15:08:01 2009 (r199388) @@ -4148,8 +4148,6 @@ xpt_release_simq(struct cam_sim *sim, in sendq->qfrozen_cnt--; if (sendq->qfrozen_cnt == 0) { - struct cam_eb *bus; - /* * If there is a timeout scheduled to release this * sim queue, remove it. The queue frozen count is @@ -4159,15 +4157,17 @@ xpt_release_simq(struct cam_sim *sim, in callout_stop(&sim->callout); sim->flags &= ~CAM_SIM_REL_TIMEOUT_PENDING; } - bus = xpt_find_bus(sim->path_id); if (run_queue) { + struct cam_eb *bus; + /* * Now that we are unfrozen run the send queue. */ + bus = xpt_find_bus(sim->path_id); xpt_run_dev_sendq(bus); + xpt_release_bus(bus); } - xpt_release_bus(bus); } } }