From: Rik van Riel <riel@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>
Cc: Andres Freund <andres@anarazel.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@fb.com
Subject: Re: [PATCH 2/3] mm: filemap: only do access activations on reads
Date: Mon, 04 Apr 2016 17:39:47 -0400 [thread overview]
Message-ID: <1459805987.6219.32.camel@redhat.com> (raw)
In-Reply-To: <20160404142233.cfdea284b8107768fb359efd@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]
On Mon, 2016-04-04 at 14:22 -0700, Andrew Morton wrote:
> On Mon, 4 Apr 2016 13:13:37 -0400 Johannes Weiner <hannes@cmpxchg.or
> g> wrote:
>
> >
> > Andres Freund observed that his database workload is struggling
> > with
> > the transaction journal creating pressure on frequently read pages.
> >
> > Access patterns like transaction journals frequently write the same
> > pages over and over, but in the majority of cases those pages are
> > never read back. There are no caching benefits to be had for those
> > pages, so activating them and having them put pressure on pages
> > that
> > do benefit from caching is a bad choice.
> Read-after-write is a pretty common pattern: temporary files for
> example. What are the opportunities for regressions here?
>
> Did you consider providing userspace with a way to hint "this file is
> probably write-then-not-read"?
I suspect the opportunity for regressions is fairly small,
considering that temporary files usually have a very short
life span, and will likely be read-after-written before they
get evicted from the inactive list.
As for hinting, I suspect it may make sense to differentiate
between whole page and partial page writes, where partial
page writes use FGP_ACCESSED, and whole page writes do not,
under the assumption that if we write a partial page, there
may be a higher chance that other parts of the page get
accessed again for other writes (or reads).
I do not know whether that assumption holds :)
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-04-04 21:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 17:13 [PATCH 0/3] mm: support bigger cache workingsets and protect against writes Johannes Weiner
2016-04-04 17:13 ` [PATCH 1/3] mm: workingset: only do workingset activations on reads Johannes Weiner
2016-04-04 17:13 ` [PATCH 2/3] mm: filemap: only do access " Johannes Weiner
2016-04-04 21:22 ` Andrew Morton
2016-04-04 21:39 ` Rik van Riel [this message]
2016-04-04 21:55 ` Andrew Morton
2016-04-05 17:50 ` Johannes Weiner
2016-04-04 22:47 ` Johannes Weiner
2016-04-04 17:13 ` [PATCH 3/3] mm: vmscan: reduce size of inactive file list Johannes Weiner
2016-04-04 18:52 ` [PATCH 0/3] mm: support bigger cache workingsets and protect against writes Andres Freund
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=1459805987.6219.32.camel@redhat.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andres@anarazel.de \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).