Loading src/balloon.py +1 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ log = logging.getLogger(__name__) CONTAINER_MEM_MARGIN = 128 * (1024 ** 2) # 128 MB SMAPS_BLOCK_HEADER_PATTERN = re.compile(r'^([0-9a-f]+-[0-9a-f]+)') SMAPS_BLOCK_SIZE_TOLERANCE = 2 * (1024 ** 2) # 2MB: accounts for page alignment/hugepages Loading Loading @@ -140,8 +141,6 @@ def byte_size_or_fraction(string: str) -> float | int: return bytes_value SMAPS_BLOCK_HEADER_PATTERN = re.compile(r'^([0-9a-f]+-[0-9a-f]+)') async def _get_host_qemu_guest_mem_rss(qmp: QMPClient, qemu_pid: int) -> Optional[int]: """Returns bytes of guest RAM currently in rss, by parsing /proc/<pid>/smaps looking for mappings matching qemu memory backend device blocks by sizes.""" Loading Loading
src/balloon.py +1 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ log = logging.getLogger(__name__) CONTAINER_MEM_MARGIN = 128 * (1024 ** 2) # 128 MB SMAPS_BLOCK_HEADER_PATTERN = re.compile(r'^([0-9a-f]+-[0-9a-f]+)') SMAPS_BLOCK_SIZE_TOLERANCE = 2 * (1024 ** 2) # 2MB: accounts for page alignment/hugepages Loading Loading @@ -140,8 +141,6 @@ def byte_size_or_fraction(string: str) -> float | int: return bytes_value SMAPS_BLOCK_HEADER_PATTERN = re.compile(r'^([0-9a-f]+-[0-9a-f]+)') async def _get_host_qemu_guest_mem_rss(qmp: QMPClient, qemu_pid: int) -> Optional[int]: """Returns bytes of guest RAM currently in rss, by parsing /proc/<pid>/smaps looking for mappings matching qemu memory backend device blocks by sizes.""" Loading