Re: Why is Shmem included in Cached in /proc/meminfo?

From: Khalid Aziz
Date: Mon Aug 30 2021 - 15:38:50 EST


On Mon, 2021-08-30 at 20:26 +0300, Mikko Rantalainen wrote:
> ... deleted ...
> Of course one possible solution is to keep "Cached" as is and
> introduce
> "Cache" with the real cache semantics (that is, it includes sum of
> (Cached - Shmem) and memory backed RAM). That way system
> administrators
> would at least see two different fields with unique values and look
> for
> the documentation.
>

I would recommend adding new field. There is likely to be a good number
of tools/scripts out there that already interpret the data from
/proc/meminfo and possily take actions based upon that data. Those
tools will break if we change the sense of existing data. A new field
has the down side of expanding the output further but it also doesn't
break existing tols.

--
Khalid