Implement beancounters limitations

Most of the beancounters and related limitations can be tracked to the
memory cgroup. The relationship is not direct, and we'll always fail to
provide limits with the beancounter granularity. What this patch does is
a best effort mapping between what we have in the beancounters and what
is upstream.

In this patch, "kmem" appears as a big placeholder. Everything that we
can't directly limit, will be interpreted at "We need kernel memory to
be capped for this".

Signed-off-by: Glauber Costa <glommer@parallels.com>
3 files changed