linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nag Avadhanam <nag@cisco.com>
To: Dave Chinner <david@fromorbit.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	"Daniel Walker (danielwa)" <danielwa@cisco.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"Khalid Mughal (khalidm)" <khalidm@cisco.com>,
	"xe-kernel@external.cisco.com" <xe-kernel@external.cisco.com>,
	"dave.hansen@intel.com" <dave.hansen@intel.com>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"riel@redhat.com" <riel@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count
Date: Mon, 15 Feb 2016 23:14:13 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.00.1602152258240.4623@mcp-bld-lnx-277.cisco.com> (raw)
In-Reply-To: <20160216053827.GX19486@dastard>

On Mon, 15 Feb 2016, Dave Chinner wrote:

> On Tue, Feb 16, 2016 at 02:58:04AM +0000, Nag Avadhanam (nag) wrote:
>> Its the calculation of the # of bytes of non-reclaimable file system cache
>> pages that has been troubling us. We do not want to count inactive file
>> pages (of programs/binaries) that were once mapped by any process in the
>> system as reclaimable because that might lead to thrashing under memory
>> pressure (we want to alert admins before system starts dropping text
>> pages).
>
> The code presented does not match your requirements. It only counts
> pages that are currently mapped into ptes. hence it will tell you
> that once-used and now unmapped binary pages are reclaimable, and
> drop caches will reclaim them. hence they'll need to be fetched from
> disk again if they are faulted in again after a drop_caches run.

Will the inactive binary pages be automatically unmapped even if the process
into whose address space they are mapped is still around? I thought they
are left mapped until such time there is memory pressure.

We only care for binary pages (active and inactive) mapped into the address 
spaces of live processes. Its okay to aggressively reclaim inactive
pages once mapped into processes that are no longer around.

thanks,
nag

>
> Cheers,
>
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com
>

  reply	other threads:[~2016-02-16  7:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 20:14 [PATCH] kernel: fs: drop_caches: add dds drop_caches_count Daniel Walker
2016-02-14 21:18 ` Dave Chinner
2016-02-15 18:19   ` Daniel Walker
2016-02-15 23:05     ` Dave Chinner
2016-02-15 23:52       ` Daniel Walker
2016-02-16  0:45         ` Theodore Ts'o
2016-02-16  2:58           ` Nag Avadhanam (nag)
2016-02-16  5:38             ` Dave Chinner
2016-02-16  7:14               ` Nag Avadhanam [this message]
2016-02-16  8:35                 ` Dave Chinner
2016-02-16  8:43             ` Vladimir Davydov
2016-02-16 18:37               ` Nag Avadhanam
2016-02-16  5:28         ` Dave Chinner
2016-02-16  5:57           ` Nag Avadhanam
2016-02-16  8:22             ` Dave Chinner
2016-02-16 16:12           ` Rik van Riel

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=alpine.LRH.2.00.1602152258240.4623@mcp-bld-lnx-277.cisco.com \
    --to=nag@cisco.com \
    --cc=corbet@lwn.net \
    --cc=danielwa@cisco.com \
    --cc=dave.hansen@intel.com \
    --cc=david@fromorbit.com \
    --cc=hannes@cmpxchg.org \
    --cc=khalidm@cisco.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=tytso@mit.edu \
    --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;
as well as URLs for NNTP newsgroup(s).