From: Mel Gorman <mgorman@suse.de>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@fb.com
Subject: Re: [PATCH] mm, compaction: direct freepage allocation for async direct compaction
Date: Wed, 29 Nov 2017 14:13:52 +0000 [thread overview]
Message-ID: <20171129141352.rguu6fgjll6bxrsh@suse.de> (raw)
In-Reply-To: <20171129063208.GC8125@js1304-P5Q-DELUXE>
On Wed, Nov 29, 2017 at 03:32:08PM +0900, Joonsoo Kim wrote:
> On Thu, Nov 23, 2017 at 02:08:43PM +0000, Mel Gorman wrote:
>
> > 3. Another reason a linear scanner was used was because we wanted to
> > clear entire pageblocks we were migrating from and pack the target
> > pageblocks as much as possible. This was to reduce the amount of
> > migration required overall even though the scanning hurts. This patch
> > takes MIGRATE_MOVABLE pages from anywhere that is "not this pageblock".
> > Those potentially have to be moved again and again trying to randomly
> > fill a MIGRATE_MOVABLE block. Have you considered using the freelists
> > as a hint? i.e. take a page from the freelist, then isolate all free
> > pages in the same pageblock as migration targets? That would preserve
> > the "packing property" of the linear scanner.
> >
> > This would increase the amount of scanning but that *might* be offset by
> > the number of migrations the workload does overall. Note that migrations
> > potentially are minor faults so if we do too many migrations, your
> > workload may suffer.
> >
> > 4. One problem the linear scanner avoids is that a migration target is
> > subsequently used as a migration source and leads to a ping-pong effect.
> > I don't know how bad this is in practice or even if it's a problem at
> > all but it was a concern at the time
>
> IIUC, this potential advantage for a linear scanner would not be the
> actual advantage in the *running* system.
>
> Consider about following worst case scenario for "direct freepage
> allocation" that "moved again" happens.
>
The immediate case should be ok as long as the migration source and the
pageblock a freepage is taken from is not the same pageblock. That might
mean that more pages from the freelist would need to be examined until
another pageblock was found.
>
> So, I think that "direct freepage allocation" doesn't suffer from such
> a ping-poing effect. Am I missing something?
>
The ping-pong effect I'm concerned with is that a previous migration
target is used as a migration source in the future. It's hard for that
situation to occur with two linear scanners but care is needed when
using direct freepage allocation.
--
Mel Gorman
SUSE Labs
--
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>
prev parent reply other threads:[~2017-11-29 14:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 14:33 [PATCH] mm, compaction: direct freepage allocation for async direct compaction Johannes Weiner
2017-11-22 14:52 ` Vlastimil Babka
2017-11-28 23:34 ` Andrew Morton
2017-11-29 12:51 ` Vlastimil Babka
2017-11-29 6:41 ` Joonsoo Kim
2017-11-23 14:08 ` Mel Gorman
2017-11-23 21:15 ` Vlastimil Babka
2017-11-24 10:57 ` Mel Gorman
2017-11-24 13:49 ` Vlastimil Babka
2017-11-24 15:11 ` Mel Gorman
2017-11-29 6:32 ` Joonsoo Kim
2017-11-29 14:13 ` Mel Gorman [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=20171129141352.rguu6fgjll6bxrsh@suse.de \
--to=mgorman@suse.de \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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 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).