Thread (21 messages) 21 messages, 5 authors, 2016-02-12

Re: computing drop-able caches

From: Dave Hansen <hidden>
Date: 2016-02-12 21:46:54
Also in: linux-fsdevel, lkml

On 02/12/2016 10:01 AM, Khalid Mughal (khalidm) wrote:
If you look at the attached pdf, you will notice that OOM messages start
to appear when memAvailable is showing 253MB (259228 KB) Free, memFree is
13.5MB (14008 KB) Free, and dropcache based calculation 3Available memory2
is showing 21MB (21720 KB) Free.

So, it appears that memAvailable is not as accurate, especially if data is
used to warn user about system running low on memory.
Yep, that's true.

But, MemAvailable is calculated from some very cheap counters.  The
"dropcache-based-calculation" requires iterating over every 4k page
cache page in the system.

Do you have some ideas for doing cheap(er) MemAvailable calculations?

We track dirty and writebackw with counters, so we should theoretically
be able to pull those out of MemAvailable fairly cheaply.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help