Skip to content

sicm_avail and sicm_capacity very often wrong #49

@benbenolson

Description

@benbenolson

Recently, a coworker and I have been working on a high-level feature that requires calls to sicm_avail and sicm_capacity, but these functions are wrong quite often. Because they read a hardcoded 66 bytes into /sys/devices/system/node/nodeX/meminfo, they're wrong when the system has less than 10GB and more than 100GB of memory (which is true for 100% of the systems that we're currently working on). This commit is the culprit.

@calccrypto What was the issue with the previous way of doing it, where you parse for MemFree or MemTotal? I can rewrite this function if you don't want to mess with it, but I don't want to introduce old bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions