From owner-svn-src-projects@FreeBSD.ORG Mon Aug 26 07:48:52 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 278F5144; Mon, 26 Aug 2013 07:48:52 +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 152D32F83; Mon, 26 Aug 2013 07:48:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7Q7mp5t089881; Mon, 26 Aug 2013 07:48:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7Q7mots089832; Mon, 26 Aug 2013 07:48:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308260748.r7Q7mots089832@svn.freebsd.org> From: Alexander Motin Date: Mon, 26 Aug 2013 07:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r254898 - projects/camlock/sys/geom/raid 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: Mon, 26 Aug 2013 07:48:52 -0000 Author: mav Date: Mon Aug 26 07:48:50 2013 New Revision: 254898 URL: http://svnweb.freebsd.org/changeset/base/254898 Log: Declare partial (receive sides only) direct dispatch support for GEOM RAID. All real work is done in separate thread, so this just allows to switch there easier. System-wide this saves up to 25% of context switches per request. Unfortunately we can't allow direct send there due to the sxlock held during respective calls. Modified: projects/camlock/sys/geom/raid/g_raid.c projects/camlock/sys/geom/raid/md_ddf.c projects/camlock/sys/geom/raid/md_intel.c projects/camlock/sys/geom/raid/md_jmicron.c projects/camlock/sys/geom/raid/md_nvidia.c projects/camlock/sys/geom/raid/md_promise.c projects/camlock/sys/geom/raid/md_sii.c Modified: projects/camlock/sys/geom/raid/g_raid.c ============================================================================== --- projects/camlock/sys/geom/raid/g_raid.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/g_raid.c Mon Aug 26 07:48:50 2013 (r254898) @@ -792,6 +792,7 @@ g_raid_open_consumer(struct g_raid_softc if (pp == NULL) return (NULL); cp = g_new_consumer(sc->sc_geom); + cp->flags |= G_CF_DIRECT_RECEIVE; if (g_attach(cp, pp) != 0) { g_destroy_consumer(cp); return (NULL); @@ -1673,6 +1674,7 @@ g_raid_launch_provider(struct g_raid_vol } pp = g_new_providerf(sc->sc_geom, "%s", name); + pp->flags |= G_PF_DIRECT_RECEIVE; pp->private = vol; pp->mediasize = vol->v_mediasize; pp->sectorsize = vol->v_sectorsize; @@ -2247,6 +2249,7 @@ g_raid_taste(struct g_class *mp, struct */ gp->orphan = g_raid_taste_orphan; cp = g_new_consumer(gp); + cp->flags |= G_CF_DIRECT_RECEIVE; g_attach(cp, pp); geom = NULL; Modified: projects/camlock/sys/geom/raid/md_ddf.c ============================================================================== --- projects/camlock/sys/geom/raid/md_ddf.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/md_ddf.c Mon Aug 26 07:48:50 2013 (r254898) @@ -2143,6 +2143,7 @@ g_raid_md_taste_ddf(struct g_raid_md_obj } rcp = g_new_consumer(geom); + rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) ; //goto fail1; Modified: projects/camlock/sys/geom/raid/md_intel.c ============================================================================== --- projects/camlock/sys/geom/raid/md_intel.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/md_intel.c Mon Aug 26 07:48:50 2013 (r254898) @@ -1477,6 +1477,7 @@ search: } rcp = g_new_consumer(geom); + rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) ; //goto fail1; Modified: projects/camlock/sys/geom/raid/md_jmicron.c ============================================================================== --- projects/camlock/sys/geom/raid/md_jmicron.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/md_jmicron.c Mon Aug 26 07:48:50 2013 (r254898) @@ -923,6 +923,7 @@ search: } rcp = g_new_consumer(geom); + rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) ; //goto fail1; Modified: projects/camlock/sys/geom/raid/md_nvidia.c ============================================================================== --- projects/camlock/sys/geom/raid/md_nvidia.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/md_nvidia.c Mon Aug 26 07:48:50 2013 (r254898) @@ -919,6 +919,7 @@ search: } rcp = g_new_consumer(geom); + rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) ; //goto fail1; Modified: projects/camlock/sys/geom/raid/md_promise.c ============================================================================== --- projects/camlock/sys/geom/raid/md_promise.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/md_promise.c Mon Aug 26 07:48:50 2013 (r254898) @@ -1176,6 +1176,7 @@ search: } rcp = g_new_consumer(geom); + rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) ; //goto fail1; Modified: projects/camlock/sys/geom/raid/md_sii.c ============================================================================== --- projects/camlock/sys/geom/raid/md_sii.c Mon Aug 26 07:17:41 2013 (r254897) +++ projects/camlock/sys/geom/raid/md_sii.c Mon Aug 26 07:48:50 2013 (r254898) @@ -1012,6 +1012,7 @@ search: } rcp = g_new_consumer(geom); + rcp->flags |= G_CF_DIRECT_RECEIVE; g_attach(rcp, pp); if (g_access(rcp, 1, 1, 1) != 0) ; //goto fail1;