All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Andres Freund <andres@anarazel.de>
Cc: Rik van Riel <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: Unhelpful caching decisions, possibly related to active/inactive sizing
Date: Tue, 16 Feb 2016 14:29:46 -0500	[thread overview]
Message-ID: <20160216192946.GA32543@cmpxchg.org> (raw)
In-Reply-To: <20160212193553.6pugckvamgtk4x5q@alap3.anarazel.de>

On Fri, Feb 12, 2016 at 08:35:53PM +0100, Andres Freund wrote:
> To make an actually usable patch out of this it seems we'd have to add a
> 'partial' argument to grab_cache_page_write_begin(), so writes to parts
> of a page still cause the pages to be marked active.  Is it preferrable
> to change all callers of grab_cache_page_write_begin and
> add_to_page_cache_lru or make them into wrapper functions, and call the
> real deal when it matters?

Personally, I'd prefer explicit arguments over another layer of
wrappers, especially in the add_to_page_cache family. But it's
possible others will disagree and only voice their opinion once you
went through the hassle and sent a patch.

> I do think that that's a reasonable algorithmic change, but nonetheless
> its obviously possible that such changes regress some workloads. What's
> the policy around testing such things?

How about a FGP_WRITE that only sets the page's referenced bit, but
doesn't activate or refault-activate the page?

That way, pages that are only ever written would never get activated,
but a single read mixed in would activate the page straightaway;
either in mark_page_accessed() or through refault-activation.

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Andres Freund <andres@anarazel.de>
Cc: Rik van Riel <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: Unhelpful caching decisions, possibly related to active/inactive sizing
Date: Tue, 16 Feb 2016 14:29:46 -0500	[thread overview]
Message-ID: <20160216192946.GA32543@cmpxchg.org> (raw)
In-Reply-To: <20160212193553.6pugckvamgtk4x5q@alap3.anarazel.de>

On Fri, Feb 12, 2016 at 08:35:53PM +0100, Andres Freund wrote:
> To make an actually usable patch out of this it seems we'd have to add a
> 'partial' argument to grab_cache_page_write_begin(), so writes to parts
> of a page still cause the pages to be marked active.  Is it preferrable
> to change all callers of grab_cache_page_write_begin and
> add_to_page_cache_lru or make them into wrapper functions, and call the
> real deal when it matters?

Personally, I'd prefer explicit arguments over another layer of
wrappers, especially in the add_to_page_cache family. But it's
possible others will disagree and only voice their opinion once you
went through the hassle and sent a patch.

> I do think that that's a reasonable algorithmic change, but nonetheless
> its obviously possible that such changes regress some workloads. What's
> the policy around testing such things?

How about a FGP_WRITE that only sets the page's referenced bit, but
doesn't activate or refault-activate the page?

That way, pages that are only ever written would never get activated,
but a single read mixed in would activate the page straightaway;
either in mark_page_accessed() or through refault-activation.

--
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-02-16 19:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 16:52 Unhelpful caching decisions, possibly related to active/inactive sizing Andres Freund
2016-02-09 16:52 ` Andres Freund
2016-02-09 22:42 ` Johannes Weiner
2016-02-09 22:42   ` Johannes Weiner
2016-02-11 20:34   ` Rik van Riel
2016-02-11 20:34     ` Rik van Riel
2016-02-12 12:46     ` Andres Freund
2016-02-12 12:46       ` Andres Freund
2016-02-12 19:35       ` Andres Freund
2016-02-12 19:35         ` Andres Freund
2016-02-16 19:29         ` Johannes Weiner [this message]
2016-02-16 19:29           ` Johannes Weiner
2016-02-17 21:17         ` Rik van Riel
2016-02-17 21:17           ` Rik van Riel
2016-02-19 22:19           ` Andres Freund
2016-02-19 22:19             ` Andres Freund
2016-02-12 12:56     ` Andres Freund
2016-02-12 12:56       ` Andres Freund
2016-02-12 20:24     ` Johannes Weiner
2016-02-12 20:24       ` Johannes Weiner
2016-02-19 22:07       ` Andres Freund
2016-02-19 22:07         ` 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=20160216192946.GA32543@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=andres@anarazel.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.