hammering lock structures

In the past days I worked on a fix for lock sizes mismatching between userspace/kernelspace which reveleated a very hard way.

Basically, lock_init() is called very early in the bootstrap code and a simple counter revealed that 8165 locks (FreeBSD-ia32, WITNESS, LOCK_PROFILING, INVARIANTS, DDB enabled) are initialized before that VM is set up and ready for working so we should have a very huge pool of pre-allocated external objects to be used in debugging kernel. The lock-free allocator (in a first moment extracting from the pool and when VM is ready fork working using malloc) is quite ready.

For the moment I want to better study and tuning an appropriate value for that pool.

Leave a Reply