linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	Mel Gorman <mgorman@suse.de>,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] mm: move swap-in anonymous page into active list
Date: Fri, 29 Jul 2016 11:08:53 -0700	[thread overview]
Message-ID: <39F87A25-801A-48A8-A042-A64861A0229B@gmail.com> (raw)
In-Reply-To: <1469811331.13905.10.camel@redhat.com>

Rik van Riel <riel@redhat.com> wrote:

> On Fri, 2016-07-29 at 12:25 +0900, Minchan Kim wrote:
>> Every swap-in anonymous page starts from inactive lru list's head.
>> It should be activated unconditionally when VM decide to reclaim
>> because page table entry for the page always usually has marked
>> accessed bit. Thus, their window size for getting a new referece
>> is 2 * NR_inactive + NR_active while others is NR_active + NR_active.
>> 
>> It's not fair that it has more chance to be referenced compared
>> to other newly allocated page which starts from active lru list's
>> head.
>> 
>> Signed-off-by: Minchan Kim <minchan@kernel.org>
> 
> Acked-by: Rik van Riel <riel@redhat.com>
> 
> The reason newly read in swap cache pages start on the
> inactive list is that we do some amount of read-around,
> and do not know which pages will get used.
> 
> However, immediately activating the ones that DO get
> used, like your patch does, is the right thing to do.

Can it cause the swap clusters to lose spatial locality?

For instance, if a process writes sequentially to memory multiple times,
and if pages are swapped out, in and back out. In such case, doesn’t it
increase the probability that the swap cluster will hold irrelevant data and
make swap prefetch less efficient?

Regards,
Nadav

--
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-07-29 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29  3:25 Minchan Kim
2016-07-29  3:30 ` Minchan Kim
2016-07-29 13:30 ` Johannes Weiner
2016-07-29 16:55 ` Rik van Riel
2016-07-29 18:08   ` Nadav Amit [this message]

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=39F87A25-801A-48A8-A042-A64861A0229B@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --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