Re: free: regression due to a different calculation of Used memory
"Michal Hocko" <[email protected]> (Redacted sender "mhocko" for DMARC) Tue, 1 Jun 2021 09:46:02 +0200
| Newsgroups | gmane.linux.procps.devel |
|---|---|
| Message-ID | <YLXlulaSCMM/[email protected]> |
On Thu 29-04-21 14:30:36, Michal Hocko wrote: > On Thu 29-04-21 22:08:31, Craig Small wrote: [...] > > proc(5) says Cached (as in the line /proc/meminfo ) is only based on disk, > > or in its words > > "In-memory cache for files read from the disk (the page cache). Doesn't > > include SwapCached." > > > > Is the man page incorrect? > > yes and no. It is correct in the sense that swapcache is explicitly > excluded but it is not fully correct claiming it is disk backed file > cache. Because it includes shmem which is a filesystem which is not > backed by disk (except for the swapout). > > A proper wording would be: In-memory cache for filesystem content (both > disk based as memory based like shmem). Doesn't include Swap cache and > buffer cache which are presented separately (SwapCached resp. Buffers). Should I send a patch to clarify this? > > I think that's the main difference now. Ideally this could be settled by > > the kernel exposing MemUsed in /proc/meminfo and everyone can use that > > (it's how available was solved). > > Why Total-Available doesn't serve that purpose already? Would be a patch to change the behavior to use Total-Available at least considered? -- Michal Hocko SUSE Labs