[cgroups2] Handle missing 'kernel' field in 'memory.stat' on linux < 5.18.

The 'kernel' key was introduced to 'memory.stat' in Kernel 5.18 and therefore
isn't present on older kernels. If it is missing, we set `kernel` to be the
sum of the other kernel usage fields provided in 'memory.stat'. This is an
under-accounting since it doesn't include:

 - various kvm allocations (e.g. allocated pages to create vcpus)
 - io_uring
 - tmp_page in pipes during pipe_write()
 - bpf ringbuffers
 - unix sockets

But it's the best measurement we can provide prior to the 'kernel' stat
being added in 5.18 that catches all of these.

As part of this, we add the 'slab' key (one of the kernel memory usage
fields) to the `memory::Stats` structure.

See kernel patch introducing 'kernel':

https://github.com/torvalds/linux/commit/a8c49af3be5f0b4e105ef678bcf14ef102c270be

This closes #576
2 files changed
tree: a99710e149028c53445b4edadf6db240c1b38cff
  1. 3rdparty/
  2. bin/
  3. cmake/
  4. docs/
  5. include/
  6. m4/
  7. site/
  8. src/
  9. support/
  10. .asf.yaml
  11. .gitattributes
  12. bootstrap
  13. CHANGELOG
  14. CMakeLists.txt
  15. configure.ac
  16. Doxyfile
  17. LICENSE
  18. Makefile.am
  19. mesos.pc.in
  20. NOTICE
  21. README.md
README.md

Apache Mesos

Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks. It can run Hadoop, Jenkins, Spark, Aurora, and other frameworks on a dynamically shared pool of nodes.

Visit us at mesos.apache.org.

Mailing Lists

Documentation

Documentation is available in the docs/ directory. Additionally, a rendered HTML version can be found on the Mesos website's Documentation page.

Installation

Instructions are included on the Getting Started page.

License

Apache Mesos is licensed under the Apache License, Version 2.0.

For additional information, see the LICENSE and NOTICE files.