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

Resident Good

Matt Dillon is bringing in resident executable support. This speeds loading of dynamically linked programs by saving a copy of their vmspace with vmspace_fork() in the kernel, and using that when executed instead of going through the regular, slower startup. This will replace prebinding.

Matt Dillon posted these preliminary numbers running a test program with Perl:

dynamic:2.860u 2.668s 0:05.61 98.3% 87+231k 0+0io 0pf+0w
prebinding:1.821u 2.095s 0:03.90 100.2% 34+202k 0+0io 1pf+0w
resident:1.239u 1.846s 0:03.08 99.6% 137+280k 0+0io 0pf+0w
statically linked:0.418u 0.867s 0:01.28 99.2% 808+616k 0+0io 0pf+0w

It is planned to make dynamic loading as fast as static. For those of you not familiar with the output of time, the first column is total time taken, the second is time taken to run the tested program, and the third is time consumed by system overhead. Yes, there are more columns than that. No, I don’t know what they mean.

A journaling journey

Discussion continues on journaling, soft updates, and background fsck. Jeroen van Gelderen linked to “Design Evolution of the EROS Single-Level Store” while talking about journaling meta-data, and Matt Dillon mentioned that he and David Rhodus are putting together a kernel API for journaling, so that some ambitious person can build it. Matt Dillon also pointed out he favors journaling because softupdates is a complex beast, and modern IDE drives are somewhat undependable when it comes to the way they lay down data. As an added bonus, Diego Calleja GarcĂ­a linked to a description of reiser4 which talks about journaling, along with some freaky illustrations.

M_NOWAIT NOGOOD

Matt Dillon noticed in a thread on the freebsd-hackers mailing list (see here for original post, and look for articles following that have [CHECKER] in the subject) that the M_NOWAIT command is being used incorrectly in a number of places, both in DragonFly and in FreeBSD.

I’m just pasting the rest of his post, as it’s not something that boils down easily:
Continue reading “M_NOWAIT NOGOOD”

Plans and other plans

As part of a discussion about internationalization, Matt Dillon mentioned he plans to finish IPC this weekend as it would be a useful implementation method. He also mentioned offhand that the first release of DragonFly could be in June/July.

645dx tricks

Bernhard Valenti found he had to put “set hw.ata.ata_dma=0” in the boot loader to get his 645DX-based motherboard ATA working. Jeroen Ketema also found that write caching had to be off: “set hw.ata.wc=0

Benchmark setups

In a discussion about benchmarks, it was noted that /etc/malloc.conf changes can help benchmarks tremendously. Rahul Siddharthan suggested ‘/etc/malloc.conf -> H' and Jeremy Messenger suggested '/etc/malloc.conf -> aj

Also, Matt Dillon made a number of suggestions on what to check when benchmarking DragonFly vs. FreeBSD (4 or 5)

Matt Dillon quote follows:
Continue reading “Benchmark setups”

Prelinking reported

Simon ‘corecode’ Schubert pointed out prelinking should be mentioned on the 2003 report; here’s the text that will soon show up on that report:

Prelinking
Prelinking capability was added to DragonFly by Simon ‘corecode’ Schubert, which allows faster loading of applications that use a large number of dynamic libraries while running, like Qt/KDE. It is not currently hooked into the system or any port building process.

Jump on journaling

David Rhodus has the journaling filesystem code from Apple located in vfs_journal.c and vfs_journal.h. He estimate it’d take 2-3 (long) days of work to get it worked into the system, which would mean no more long fscks after unlcean shutdowns. Any takers? Everyone would love you for it.

Idle hands do the daemon’s work

Eirik Nygaard was looking for something to do; Max Laier pointed out removal of #if defined(__FreeBSD__) / #if __FreeBSD_version > 5 would help, and Jeffrey Hsu indicated backporting the UFS2 size extensions would also be good.

I’ll quote my own followup to say there’s plenty of non-coding tasks available, too.