varsym and resident rc.d

Eirik Nygaard and Robert Garrett have added 2 new scripts to /etc/rc.d (they default to off):

resident: Any filenames/pathnames in /etc/resident.conf are made resident – i.e. dynamic programs listed here will load faster.

varsym: Any variable definitions in /etc/varsym.conf will turn into system wide varsyms.

AMD64 work starting

Matt Dillon’s planning to work on AMD64 support for February. He listed these steps:

“* build support and cross compilation work
* kernel build
* boot 64-bit kernel almost to single user
* 32 bit userland support
* boot kernel to single user
* basic device driver and filesystem testing
* boot kernel to multi user (fully working system at this point)
* everyone w/ 64 bit boxes start banging on it, fixing additional
device drivers, get 64 bit buildworlds working, and so forth.”

Systimer stuff

Matt Dillon’s been working on this patch, described as so:

“These are dyamic[sic] interrupt-driven timers. They replace the old fixed periodic ‘hardclock’ interrupt that exists now and allow per-cpu multiple periodic or one-shot timer interrupts to be registered with the system. Systimers operate outside the MP lock, so any code developed to use it has to be MP safe. Systimers are intended to be able to make use of per-cpu timers (e.g. LAPIC), when available, and will eventually be augmented to use them.”

It also has the added bonus of making nanosleep() very accurate.

gcc 3 going on

Joerg Sonnenberger has added gcc 3.3 to the base system. You can set ‘CCVER=gcc3’ to use it, even to do a buildworld/buildkernel, though that is “not recommended”. Andreas Hauser already reported a successful build and boot doing it, though.

xl expanded

Matt Dillon has made some changes to the xl driver that apparently solves a mysterious bug; I’m quoting from his changelog message below:

“Turn off hardware assisted transmit checksums by default. In buildworld loop tests this has been conclusively shown to corrupt transmit packets about one out of every million packets. The receive will not know the the packet is bad because hardware assist also apples the correct checksum to the corrupted packet. The result are random failures or corruption of network data in certain situations. On DragonFly, for some reason, doing a ‘resident /usr/bin/*’ seems to bring the problem out every few buildworlds with (primarily) mkdep’s cpp complaining about odd errors trying to open non-existant header files (during a header file search), such as EPROTONOSUPPORT. A tcpdump on both NFS client and server showed the client transmitting an access RPC and the server seeing a corrupted access RPC on its end, and then responding with EPROTONOSUPPORT. Other uncaught errors are also almost certainly occuring. mkdep is more likely to catch them because it actually checks the errno of a failed open() and does a huge number of open()’s (and as an NFS client this generates a huge amount of packet traffic).”

Debugging options

Matt Dillon noted that:

makeoptions DEBUG=-g
options DDB
options INVARIANTS
options INVARIANT_SUPPORT

are the only options you need when building with debugging options on.

Faster file descriptor allocation

Skip Ford ported Tim Robbins’ FreeBSD port of Niels Provos’ NetBSD file descriptor allocation code. Normally I don’t post about code until it gets committed, but he posted some numbers on how well it improves things, as benchmarked by Niels Provos’ test program that opens/closes files repeatedly. The numbers seem to indicate a 50% speedup:

File DescriptorsUnpatchedPatched
10.7656500.781279
20011.1484840.789092
40011.5469350.765657
60012.0625820.781276
80012.5157250.796906
100013.0860610.796904
120013.6329550.765654
140014.0860980.757841
160014.5158050.820343
180014.9767590.812530
200015.4299160.796905
220015.8986520.773467
240016.3361880.773455
260016.7502680.804718
280017.1799720.789091
300017.6331100.781281
320018.0706320.789091
340018.5237710.796906
360018.9534790.789092
380019.3753700.765656
4000110.1175870.789090
4200110.7582380.789091
4400111.3676360.804718
4600111.8207810.812531
4800112.4536180.812530