linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
	Rik van Riel <riel@redhat.com>,
	Vinayak Menon <vinmenon@codeaurora.org>,
	Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] mm: make faultaround produce old ptes
Date: Wed, 18 May 2016 11:33:48 +0300	[thread overview]
Message-ID: <20160518083348.GA23276@node.shutemov.name> (raw)
In-Reply-To: <20160518082228.GD21654@dhcp22.suse.cz>

On Wed, May 18, 2016 at 10:22:28AM +0200, Michal Hocko wrote:
> On Wed 18-05-16 11:04:33, Kirill A. Shutemov wrote:
> > On Wed, May 18, 2016 at 09:25:50AM +0200, Michal Hocko wrote:
> > > On Tue 17-05-16 15:32:46, Kirill A. Shutemov wrote:
> > > > Currently, faultaround code produces young pte. This can screw up vmscan
> > > > behaviour[1], as it makes vmscan think that these pages are hot and not
> > > > push them out on first round.
> > > > 
> > > > Let modify faultaround to produce old pte, so they can easily be
> > > > reclaimed under memory pressure.
> > > 
> > > Could you be more specific about what was the original issue that led to
> > > this patch? I can understand that marking all those pages new might be
> > > too optimistic but when does it matter actually? Sparsely access file
> > > mmap?
> > 
> > Yes, sparse file access. Faultaround gets more pages mapped and all of
> > them are young. Under memory pressure, this makes vmscan to swap out anon
> > pages instead or drop other page cache pages which otherwise stay
> > resident.
> 
> I am wondering whether it would make more sense to do the fault around
> only when chances are that the memory will be used. E.g. ~VM_RAND_READ
> resp VM_SEQ_READ rather than unconditionally.

I'm not sure about this.

The idea of faularound is that we already have almost everything in our
hands to map additional pages for very little cost: all required locks
has been taken and radix-tree look up will be done anyway.

So I don't see a benefit from limiting us here. Do you?

-- 
 Kirill A. Shutemov

--
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-05-18  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17 12:32 [PATCH] mm: make faultaround produce old ptes Kirill A. Shutemov
2016-05-18  1:22 ` Minchan Kim
2016-05-18  1:27   ` Minchan Kim
2016-05-18  7:25 ` Michal Hocko
2016-05-18  8:04   ` Kirill A. Shutemov
2016-05-18  8:22     ` Michal Hocko
2016-05-18  8:33       ` Kirill A. Shutemov [this message]
2016-05-18  8:43         ` Michal Hocko
2016-05-19  4:27 ` 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=20160518083348.GA23276@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    --cc=vinmenon@codeaurora.org \
    /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).