Menu

#14 Use MemAvailable for memory calculations, if available

Unstable (example)
accepted
nobody
None
5
2023-03-16
2022-12-01
No

The current math seems to be incorrect in certain cases, e.g if a tmpfs is using memory,
this is not reflected in the current algorithm.
MemAvailble was introduced in kernel 3.14 and seems to be more correct in this aspect [1]
This patch is using MemAvailable if available and falls back to the old calculation if not.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0a

1 Attachments

Discussion

  • Paul Crawford

    Paul Crawford - 2023-03-16

    The supplied patch seemed to to actually read 'FREEAVAILMEM' anywhere! That has been fixed and the rest of the logic applied.

     
  • Paul Crawford

    Paul Crawford - 2023-03-16
    • status: open --> accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.