Despite being small, X15 already supports quite a few configurations, such as i386 (32-bits x86, with or without PAE), amd64 (also known as x86_64) and a bunch of test modules. It’s very likely to support more in the future, so I decided to take some time and try Buildbot, a continuous integration framework, to automate builds with varying options. A link to the web interface is now in the main menu bar of the web site.
The new sref module provides scalable reference counters, implemented as described in the RadixVM paper (3.1 Reference counting with Refcache). Weak references aren’t supported, since I’m not sure they’ll actually be needed, but it’s already realtime-friendly, as all critical sections implemented by disabling preemption are constant-time and short, and also dyntick-friendly, by tracking which processors actually participate in reference counting, without the need to regularly wake idle processors to function. Along with per-processor page tables, this was the last major step towards revamping (and completing) the virtual memory system.
For some reason, the system has become more unstable recently. I’ve seen it freeze as soon as swapping memory out. I suspect it’s because of recent changes on the ext2 file system. These changes are good but they expose existing bugs we didn’t suffer from in the past. In order to cope with that, I’ve been using a kernel with no VM object cache, and completely synchronous file system accesses.
During my years working in different teams at different companies, I was struck by the general lack of understanding about memory. Continue reading “Memory management – a view for software engineers”
As I started working on a Refcache prototype (Refcache being a scalable reference counting scheme introduced in the RadixVM paper), tests run with little physical memory (currently 6 MB, could be less but Grub seems to require that much) started to fail. The introduction of the delta caches blew the size of the bss section up by about 10 MB, for only 32 processors at most. It was time to provide real support for percpu variables, at least those that are statically allocated.
Switching to a new project also made me work back on buildroot a bit. Since the project would benefit from compilation time, and this server was idling most of the time, a buildroot autobuilder was set up.
The good news is that the patch may land in upstream soon.