Commit 05d751c4 authored by Craig Small's avatar Craig Small

free: use SReclaimable in cached

The previous commit added all of slab into the cache value. The
thing was is cached in this context is something you can get
back and reclaim if under memory pressure.

The problem was slab parameter includes both reclaimable and
unreclaimable values which doesn't make sense in this context.
This commit make cached only use the reclaimable component.


parent 9fda3da0
......@@ -32,7 +32,7 @@ kernels 2.6.32, displayed as zero if not available)
Memory used by kernel buffers (Buffers in /proc/meminfo)
Memory used by the page cache and slabs (Cached and Slab in /proc/meminfo)
Memory used by the page cache and slabs (Cached and SReclaimable in /proc/meminfo)
Sum of \fBbuffers\fR and \fBcache\fR
......@@ -704,7 +704,7 @@ nextline:
kb_inactive = kb_inact_dirty + kb_inact_clean + kb_inact_laundry;
kb_main_cached = kb_page_cache + kb_slab;
kb_main_cached = kb_page_cache + kb_slab_reclaimable;
kb_swap_used = kb_swap_total - kb_swap_free;
/* if kb_main_available is greater than kb_main_total or our calculation of
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment