cvs commit: src/sys/geom/gate g_gate.c g_gate.h

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Feb 9 08:43:06 GMT 2005


On Wed, Feb 09, 2005 at 08:29:40AM +0000, Pawel Jakub Dawidek wrote:
+> pjd         2005-02-09 08:29:39 UTC
+> 
+>   FreeBSD src repository
+> 
+>   Modified files:
+>     sys/geom/gate        g_gate.c g_gate.h 
+>   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 lock.
+>   - 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=1
		- 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=1
		- 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).

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20050209/6ddef8e4/attachment.bin


More information about the cvs-all mailing list