[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56BE52CE.5070403@intel.com>
Date: Fri, 12 Feb 2016 13:46:54 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: "Khalid Mughal (khalidm)" <khalidm@...co.com>,
Rik van Riel <riel@...hat.com>,
"Daniel Walker (danielwa)" <danielwa@...co.com>,
Johannes Weiner <hannes@...xchg.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Michal Hocko <mhocko@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"xe-kernel@...ernal.cisco.com" <xe-kernel@...ernal.cisco.com>
Subject: Re: computing drop-able caches
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 ³Available memory²
> 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.
Powered by blists - more mailing lists