cgroups: Cache controller masks and optimize queues.