mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Rik van Riel <riel@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	Nick Piggin <npiggin@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] splitlru: BDI_CAP_SWAP_BACKED
Date: Mon, 30 Jun 2008 21:55:13 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0806302103240.3064@blonde.site> (raw)
In-Reply-To: <20080630154912.15f03b97@bree.surriel.com>

On Mon, 30 Jun 2008, Rik van Riel wrote:
> 
> Tmpfs is often in the same boat as anonymous memory.
> Used for shared memory segments, or for files that
> are temporary and will be gone soon.

Anonymous memory, and temporary files, are often soon gone,
okay.  But I don't find that generalization compelling; and
if they're soon gone, does it matter which lru they go on?

> If swap space runs out, tmpfs pages should not be
> scanned.

That point I like.  But I hope they'd go to the Unevictable
on systems with no swap at all (of course, as with mlocking,
that can change soon after).

> To me, this suggests they should probably continue
> to live on the *_ANON LRUs.  Worst case we make
> tmpfs pages in files that are not mmaped (/tmp use)
> start out on the inactive list, so they get evicted
> first.

Tweaking in/active I'll gladly leave to you!  Whatever
proves best.  What's worrying me is that we have always treated
shmem/tmpfs pages as file pages (e.g. in /proc/meminfo as Cached
not as SwapCached), up until the point that we retire them to
swap; but in splitlru you're sending them down another path;
then mem cgroups seem to want them as something else again.

Your SwapBacked may indeed turn out to be the only implementable
distinction, but it does worry me.  A more useful distinction,
my gut tells me, would be separate LRUs for page_mapped() and
!page_mapped(), which reflects the existing swappiness notion.

But that immediately hits the difficulty we have in switching LRU
midstream, which your SwapBacked-throughout tmpfs neatly sidesteps.

I'd really like to be able to try page_mapped/!page_mapped versus
swap-backed/file-backed, but it would need some LRU-switching
infrastructure (which might come at a prohibitive performance
cost, since it's the batching that poses the problem).

Hugh

  reply	other threads:[~2008-06-30 20:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29  0:20 [PATCH] splitlru: shmem_getpage SetPageSwapBacked sooner Hugh Dickins
2008-06-29  0:22 ` [PATCH] splitlru: memcg swapbacked pages active Hugh Dickins
2008-06-29  8:19   ` KOSAKI Motohiro
2008-06-29 12:20     ` Hugh Dickins
2008-06-29 12:58       ` KOSAKI Motohiro
2008-06-29 13:51         ` Hugh Dickins
2008-06-30  2:44   ` KAMEZAWA Hiroyuki
2008-06-30 19:19     ` Hugh Dickins
2008-06-30  8:36   ` [RFC][PATCH] memcg: change shmem handler KAMEZAWA Hiroyuki
2008-06-30 19:52     ` Hugh Dickins
2008-07-01  0:56     ` kamezawa.hiroyu
2008-07-02  2:16       ` [RFC][PATCH] memcg: shmem swap cache KAMEZAWA Hiroyuki
2008-07-01  1:06     ` Re: Re: [RFC][PATCH] memcg: change shmem handler kamezawa.hiroyu
2008-07-03  7:15     ` Balbir Singh
2008-07-03  7:56       ` KAMEZAWA Hiroyuki
2008-06-29  0:24 ` [PATCH] splitlru: BDI_CAP_SWAP_BACKED Hugh Dickins
2008-06-29  8:48   ` KOSAKI Motohiro
2008-06-29 15:16     ` Rik van Riel
2008-06-30  2:53     ` KAMEZAWA Hiroyuki
2008-06-30 19:23       ` Hugh Dickins
2008-06-30 19:49         ` Rik van Riel
2008-06-30 20:55           ` Hugh Dickins [this message]
2008-06-30 21:17             ` Rik van Riel
2008-06-29  8:09 ` [PATCH] splitlru: shmem_getpage SetPageSwapBacked sooner KOSAKI Motohiro

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=Pine.LNX.4.64.0806302103240.3064@blonde.site \
    --to=hugh@veritas.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=riel@redhat.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

all inboxes | Powered by JetHome®