nri-plugins icon indicating copy to clipboard operation
nri-plugins copied to clipboard

libmem: implement policy-agnostic memory allocation/accounting.

Open klihub opened this issue 1 year ago • 0 comments

This patch series

  • implements a policy-agnostic library for memory allocation/accounting
  • replaces existing memory accounting in the topology-aware policy with libmem
  • plugs in libmem-based memory accounting and allocation to the balloons policy

For a more detailed description of the main ideas, core concepts, and some high level implementation details, see the included package documentation.

TODO items:

  • [x] get #329 merged then rebase
  • [x] add missing ensureNormalMemory() during initial zone selection
  • [x] allow for both strict and preferred memory type selection
  • [x] add an interface for overriding builtin zone expansion and overflow resolution
  • [x] make sure memory type preference is consistently either a preference or a requirement
  • [x] add a description of how the allocator works/describe the basic idea
  • [x] comment/document zone expansion, zone overflow resolution
  • [x] clean up debug-logging to be actually helpful

A few remaining questions related to this initial implementation:

  • Should we allow more granular prioritization than the current QoS class/Preserving/Reservation mapped to Inertia ?
  • Are the builtin defaults good enough ?

klihub avatar Jun 18 '24 07:06 klihub