Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information