Date: Wed, 9 Feb 2005 09:43:04 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/geom/gate g_gate.c g_gate.h Message-ID: <20050209084304.GS1080@darkness.comp.waw.pl> In-Reply-To: <200502090829.j198TeLR057566@repoman.freebsd.org> References: <200502090829.j198TeLR057566@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050209084304.GS1080>