[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach 1/3] kern: improve assert
From: |
Justus Winter |
Subject: |
Re: [PATCH gnumach 1/3] kern: improve assert |
Date: |
Fri, 19 Dec 2014 15:47:20 +0100 |
User-agent: |
alot/0.3.5 |
Quoting Justus Winter (2014-12-19 11:19:34)
> Quoting Samuel Thibault (2014-12-19 02:54:17)
> > Justus Winter, le Fri 19 Dec 2014 02:48:56 +0100, a écrit :
> > > Use the ternary operator to implement `assert' like it is done in the
> > > glibc. The glibcs changelog does not mention the rationale behind
> > > this change, but it does improve our IPC performance.
> >
> > Mmm, is it not a matter of changing the estimation of probability of
> > branching from the compiler? I guess using an "unlikely" macro would
> > get the same benefit in a much more readable and compiler-portable way?
>
> Yes, I tried that first, without getting any improvements. The libc
> once used __builtin_expect for assert too, but stopped (they didn't
> mention why in the changelog).
>
> Lacking a specialized IPC microbenchmark I'm using iperf to measure
> TCP performance (over netdde), which is greatly influenced by IPC
> performance.
>
> I'll work a little on my IPC microbenchmark, and try to reproduce my
> findings with it.
I have pushed my benchmark here:
http://darnassus.sceen.net/gitweb/teythoon/machometer.git/
Here is an example run:
start ext2fs: Hurd server bootstrap: ext2fs[device:hd0s1] exec startup proc
auth.
+ dhclient -v /dev/eth0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
can't create /var/lib/dhcp/dhclient.leases: Read-only file system
Listening on Socket//dev/eth0
Sending on Socket//dev/eth0
DHCPDISCOVER on /dev/eth0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on /dev/eth0 to 255.255.255.255 port 67
DHCPOFFER from 10.0.2.2
DHCPACK from 10.0.2.2
/sbin/dhclient-script: 52: /sbin/dhclient-script: cannot create
/etc/resolv.conf.dhclient-new: Read-only file system
chown: cannot access '/etc/resolv.conf.dhclient-new': No such file or directory
chmod: cannot access '/etc/resolv.conf.dhclient-new': No such file or directory
mv: cannot stat '/etc/resolv.conf.dhclient-new': No such file or directory
can't create /var/lib/dhcp/dhclient.leases: Read-only file system
bound to 10.0.2.15 -- renewal in 37346 seconds.
+ iperf -t 60 -c 10.0.2.2
------------------------------------------------------------
Client connecting to 10.0.2.2, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.2.15 port 32768 connected with 10.0.2.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-60.0 sec 855 MBytes 119 Mbits/sec
+ /machometer -n 33554432
N: 33554432 (1<<25), qlimit: 5
mach_print: 5s840000us 174.045563ns 5745621.918 (1/s)
nullmsg: 6s400000us 190.734863ns 5242880.000 (1/s)
producer: 28s420000us 846.982002ns 1180662.632 (1/s)
consumer: 28s420000us 846.982002ns 1180662.632 (1/s)
+ /machometer -n 33554432
N: 33554432 (1<<25), qlimit: 5
mach_print: 5s820000us 173.449516ns 5765366.323 (1/s)
nullmsg: 6s390000us 190.436840ns 5251084.820 (1/s)
producer: 23s570000us 702.440739ns 1423607.637 (1/s)
consumer: 23s570000us 702.440739ns 1423607.637 (1/s)
+ /machometer -n 33554432
N: 33554432 (1<<25), qlimit: 5
mach_print: 5s810000us 173.151493ns 5775289.501 (1/s)
nullmsg: 6s420000us 191.330910ns 5226547.040 (1/s)
producer: 25s670000us 765.025616ns 1307145.773 (1/s)
consumer: 25s670000us 765.025616ns 1307145.773 (1/s)
Too bad our clock is soo bad :/ Also, I'm fed up with cpusets to pin
my qemu process. Measuring the impact of the patches will have to
wait.
Justus
Re: [PATCH gnumach 1/3] kern: improve assert, Samuel Thibault, 2014/12/20