Hi all,
Well after the note that the list's been a little quiet I thought I'd
mention the code I've been working on for the last week.
I decided that the context switch time on a DX/4 system I use (no L2 cache)
was way too slow, so I started optimising. This is absolutely critical to
the operation of layered servers.
I started by assuming that gcc 2.X would produce better code than the 1.42
version we're using now (and allows inline assembly), so I've been cross
compiling from Linux. I modified Mike Larson's perf1 test to do 0.5M
context switches and timed the results. I also timed a complete kernel
rebuild. Both of these were done automatically at boot time for
repeatability.
Initially I scored 100 seconds for the context switches, and 120 seconds for
the kernel build (gives 200 us per context switch)
My main target has been the code in locore.s, some of which I've inlined,
but I've also switched optimisations to -m486 and -O2. I also modified the
build instructions to mutex.c to inline all of the functions (a big win).
Whilst doing this, Andy and I have also clobbered a couple of other things
which were big performance losses (4 or 5% of the switch time), and one bug
that stopped the kernel from running if -DDEBUG was turned off (worth about
20 us)
So far I'm close to my eventual aiming point (100 us), now scoring 53
seconds for 0.5M context switches (106 us), and I can now rebuild the kernel
in 79 seconds.
Regards,
Dave
Received on Tue Jan 10 00:37:59 1995
This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:11 PDT