That’s clever. Makes for terrible UX, though.
AFAIK the only way for you to figure out how much of your disks is actually cached involves enumerating all tmpfs and ramfs mounts, summing their sizes, and subtracting the sum from the cache size reported by the kernel.
Ostensibly you could subtract "Shmem"[1] in /proc/meminfo from the cached value... maybe?
Do agree it's not the best UX and utilities should probably do a better job at showing that
[1]: https://man7.org/linux/man-pages/man5/proc_meminfo.5.html
Well, what's the alternative? Invent a new type of memory reservations specifically to account for tmpfs/ramfs mounts? That'd violate your own stated desired goal of
> The OS should just expose a counter for available memory instead of having applications understand every type of memory reservation.