From owner-cvs-src@FreeBSD.ORG Wed Feb 9 08:43:06 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8490E16A4CE; Wed, 9 Feb 2005 08:43:06 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B0AC43D49; Wed, 9 Feb 2005 08:43:06 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 5A9E0ACB34; Wed, 9 Feb 2005 09:43:04 +0100 (CET) Date: Wed, 9 Feb 2005 09:43:04 +0100 From: Pawel Jakub Dawidek To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20050209084304.GS1080@darkness.comp.waw.pl> References: <200502090829.j198TeLR057566@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WKQ7zUpzoH2KEHMN" Content-Disposition: inline In-Reply-To: <200502090829.j198TeLR057566@repoman.freebsd.org> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: Re: cvs commit: src/sys/geom/gate g_gate.c g_gate.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2005 08:43:06 -0000 --WKQ7zUpzoH2KEHMN Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 09, 2005 at 08:29:40AM +0000, Pawel Jakub Dawidek wrote: +> pjd 2005-02-09 08:29:39 UTC +>=20 +> FreeBSD src repository +>=20 +> Modified files: +> sys/geom/gate g_gate.c g_gate.h=20 +> Log: +> - Remove g_gate_hold()/g_gate_release() from start/done paths. It saves +> 4 mutex operations per I/O requests. +> - Use only one mutex to protect both (incoming and outgoing) queue. +> As MUTEX_PROFILING(9) shows, there is no big contention for this loc= k. +> - Protect sc_queue_count with queue mutex, instead of doing atomic +> operations on it. +> - Remove DROP_GIANT()/PICKUP_GIANT() - ggate is marked as MPSAFE and no +> Giant there. With those fixes (mostly first one) I'm able to get 109MB/s (without real storage device on the server side). Environment: Client side: Dual Xeon 1.8GHz + HTT, on-board em0 - polling enabled only on this interface - net.isr.enable=3D1 - em0 MTU 12kB Server side: Pentium IV 3.2GHz + HTT, on-board em0 - no polling (don't want to mess too much with this machine) - net.isr.enable=3D1 - em0 MTU 12k Additional things: - mpsafe polling patch from glebius@ with my local fixes - USB turned off on server side, because interrupt was shared between UHCI and em0 (and USB is Giant-locked) And one more important thing. This was done with new ggatec(8)/ggated(8) versions, which are not committed yet. New version of ggated(8) is using three threads: - one thread for receiving I/O requests from the network - one thread for disk operations - one thread for sending results back New version of ggatec(8) is using two processes: - one process for getting I/O requests from the kernel and sending them over the network to ggated - one process for receiving responses and sending them to the kernel I cannot make ggatec(8) to use threads, because when I'm stopping thread via msleep(9) in kernel, the whole process stops (so receiving thread cannot work). --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --WKQ7zUpzoH2KEHMN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCCc0YForvXbEpPzQRAgomAJ44ZrT7WAbfDDBPawoipUjIkjsp8wCfZ2N7 fPK0qxJ3HlnUamiDyCwL8BM= =Q05W -----END PGP SIGNATURE----- --WKQ7zUpzoH2KEHMN--