Ujanja Ni Uhai (Hustling Is Life)

libvirt “unable to create vcpu group” on linux-ck kernel

I’ve been using Con Kolivas’ linux-ck patch set for a few years now. If you’ve ever asked yourself “It’s 2013, why does my music playback skip when I do too many things on my computer?!” then you probably need to look if your distro has a ck-patched kernel. A large part of the ck patch set is the “Brain Fuck Scheduler” (BFS), a greatly-simplified scheduler of CPU time slices which aims to improve interactivity of the desktop during all sorts of workloads.

As far as I could tell the errors were random; sometimes rebooting helped, etc. I couldn’t understand why until recently when I was reading the comments of some (linux-ck maybe?) Arch Linux User Repository package and then it clicked…

BFS doesn’t support cgroups

It turns out that BFS doesn’t support cgroups, and libvirt relies heavily on cgroups. So you need to run a kernel which supports cgroups if you want to use libvirt. Otherwise just stick to straight KVM or VirtualBox for all your virtualization needs.

BFS is still cool

In implementing BFS Con removed thousands of lines of code from the Linux kernel’s scheduler implementation, greatly simplifying the scheduling process. The idea behind it is dead simple. As Con explained once, BFS is basically like having one master queue to service several supermarket checkers (as opposed to each checker having his/her own queue). There’s a video explaining this type of queuing theory on YouTube here: Why the other line is likely to move faster.