linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Daniel Walker <danielwa@cisco.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Michal Hocko <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, "Khalid Mughal (khalidm)" <khalidm@cisco.com>,
	"xe-kernel@external.cisco.com" <xe-kernel@external.cisco.com>,
	Rik van Riel <riel@redhat.com>
Subject: Re: computing drop-able caches
Date: Fri, 29 Jan 2016 17:33:46 -0500	[thread overview]
Message-ID: <20160129223346.GA30068@cmpxchg.org> (raw)
In-Reply-To: <56ABD7EB.7000404@cisco.com>

On Fri, Jan 29, 2016 at 01:21:47PM -0800, Daniel Walker wrote:
> On 01/28/2016 05:55 PM, Johannes Weiner wrote:
> >On Thu, Jan 28, 2016 at 05:29:41PM -0800, Daniel Walker wrote:
> >>On 01/28/2016 05:03 PM, Daniel Walker wrote:
> >>[regarding MemAvaiable]
> >>
> >>This new metric purportedly helps usrespace assess available memory. But,
> >>its again based on heuristic, it takes 1/2 of page cache as reclaimable..
> >No, it takes the smaller value of cache/2 and the low watermark, which
> >is a fraction of memory. Actually, that does look a little weird. Rik?
> >
> >We don't age cache without memory pressure, you don't know how much is
> >used until you start taking some away. Heuristics is all we can offer.
> 
> With a simple busybox root system I get this,
> 
> MemTotal:          16273996 kB
> MemFree:          16137920 kB
> MemAvailable:   16046132 kB
> 
> shouldn't MemAvailable be at least the same as MemFree ? I changed the code
> somewhat so it subtracted the wmark_low only, or the pagecache/2 only, both
> are still under MemFree. This system has very little drop-able caches.

No, a portion of memory is reserved for the kernel and not available
to userland. If the kernel doesn't use it it will remain free. Hence
the lower MemAvailable.

--
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>

  reply	other threads:[~2016-01-29 22:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 23:42 Daniel Walker
2016-01-28 23:58 ` Johannes Weiner
2016-01-29  1:03   ` Daniel Walker
2016-01-29  1:29     ` Daniel Walker
2016-01-29  1:55       ` Johannes Weiner
2016-01-29 21:21         ` Daniel Walker
2016-01-29 22:33           ` Johannes Weiner [this message]
2016-01-29 22:41         ` Rik van Riel
2016-02-08 20:57           ` Khalid Mughal (khalidm)
2016-02-10 18:04             ` Daniel Walker
2016-02-10 18:13               ` Dave Hansen
2016-02-10 19:11                 ` Daniel Walker
2016-02-11 22:11                   ` Rik van Riel
2016-02-12 18:01                     ` Khalid Mughal (khalidm)
2016-02-12 21:46                       ` Dave Hansen
2016-02-12 22:15                         ` Johannes Weiner
2016-02-12 18:06 ` Dave Hansen
2016-02-12 18:15   ` Daniel Walker
2016-02-12 18:18     ` Dave Hansen
2016-02-12 18:25       ` Daniel Walker
2016-02-12 20:15       ` Daniel Walker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160129223346.GA30068@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=danielwa@cisco.com \
    --cc=khalidm@cisco.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=riel@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xe-kernel@external.cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox