Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proc: fix MemAvailable in /proc/meminfo to exclude tmpfs files #615

Merged
merged 1 commit into from
Oct 4, 2023

Commits on Oct 3, 2023

  1. proc: fix MemAvailable in /proc/meminfo to exclude tmpfs files

    The "total_cache" from memory.stat of cgroup includes
    the memory used by tmpfs files ("total_shmem"). Considering
    it as available memory is wrong because files created
    on a tmpfs file system cannot be simply reclaimed.
    
    So the available memory is calculated with the sum of:
     * Memory the kernel knows is free
     * Memory that contained in the kernel active file LRU,
       that can be reclaimed if necessary
     * Memory that is contained in the kernel non-active file
       LRU, that can be reclaimed if necessary
    
    Signed-off-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz>
    kyeongy committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5340b27 View commit details
    Browse the repository at this point in the history