Subject: Re: merge of freebsd eventhandler
To: Brett Lymn <blymn@baesystems.com.au>
From: Brett Lymn <blymn@baesystems.com.au>
List: tech-kern
Date: 06/22/2006 21:39:36
Folks,

I was asked off list what the impact of the eventhandler code was in
terms of size of the kernel and also performance.  I built two GENERIC
kernels, one a freshly checked out CVS src tree with no modification
and the other was built after applying my updates to the tree.  I
booted my laptop to single user mode with both kernels and ran
lmbench.  My laptop was running at it's lowest speed setting for both
runs.  Here are the results:

size:

   text    data     bss     dec     hex filename
7600549  323332  367992 8291873  7e8621 /netbsd.eventq
7598429  323268  367928 8289625  7e7d59 /netbsd.noeventq

a size increase of around 2k.

lmbench:

                 L M B E N C H  1 . 9   S U M M A R Y
                 ------------------------------------
                 (Alpha software, do not distribute)

Processor, Processes - times in microseconds - smaller is better
----------------------------------------------------------------
Host                 OS  Mhz null null      open selct sig  sig  fork exec sh  
                             call  I/O stat clos       inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ----- ---- ---- ---- ---- ----
t-eventq  NetBSD 3.99.2  798  0.5  1.6    4    6 0.03K  1.2    4 0.2K   1K   2K
t-noevent NetBSD 3.99.2  798  0.5  1.6    4    6 0.03K  1.2    4 0.2K   1K   2K

Context switching - times in microseconds - smaller is better
-------------------------------------------------------------
Host                 OS 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
                        ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw   ctxsw
--------- ------------- ----- ------ ------ ------ ------ ------- -------
t-eventq  NetBSD 3.99.2    2      4     15     6     15       6      15
t-noevent NetBSD 3.99.2    2      4     15     6     15       6      15

*Local* Communication latencies in microseconds - smaller is better
-------------------------------------------------------------------
Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                        ctxsw       UNIX         UDP         TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
t-eventq  NetBSD 3.99.2     2    10   12                             
t-noevent NetBSD 3.99.2     2    10   12                             

File & VM system latencies in microseconds - smaller is better
--------------------------------------------------------------
Host                 OS   0K File      10K File      Mmap    Prot    Page
                        Create Delete Create Delete  Latency Fault   Fault 
--------- ------------- ------ ------ ------ ------  ------- -----   ----- 
t-eventq  NetBSD 3.99.2     53     25     60     56      409          3.7K
t-noevent NetBSD 3.99.2     53     26     61     56      409          3.8K

*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------
Host                OS  Pipe AF    TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                             UNIX      reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
t-eventq  NetBSD 3.99.2 1106  279   -1    484   1468    678    623 1469   653
t-noevent NetBSD 3.99.2 1108  289   -1    483   1467    676    620 1464   653

Memory latencies in nanoseconds - smaller is better
    (WARNING - may not be correct, check graphs)
---------------------------------------------------
Host                 OS   Mhz  L1 $   L2 $    Main mem    Guesses
--------- -------------   ---  ----   ----    --------    -------
t-eventq  NetBSD 3.99.2   798     3     12         120
t-noevent NetBSD 3.99.2   798     3     12         120


In terms of performance I don't see any significant variations, I ran
the tests a few times and also double checked that I had indeed booted
the right kernels by doing an nm on the kernel and looking for the
eventhandler functions.

-- 
Brett Lymn