From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>,
Vlastimil Babka <vbabka@suse.cz>,
Minchan Kim <minchan@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Mel Gorman <mgorman@techsingularity.net>,
Hugh Dickins <hughd@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
stable@vger.kernel.org
Subject: Re: [patch] mm, compaction: abort free scanner if split fails
Date: Wed, 22 Jun 2016 14:59:02 -0700 [thread overview]
Message-ID: <20160622145902.9f07aa13048d4782c881cb6c@linux-foundation.org> (raw)
In-Reply-To: <20160622145617.79197acff1a7e617b9d9d393@linux-foundation.org>
On Wed, 22 Jun 2016 14:56:17 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 21 Jun 2016 18:22:49 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:
>
> > If the memory compaction free scanner cannot successfully split a free
> > page (only possible due to per-zone low watermark), terminate the free
> > scanner rather than continuing to scan memory needlessly. If the
> > watermark is insufficient for a free page of order <= cc->order, then
> > terminate the scanner since all future splits will also likely fail.
> >
> > This prevents the compaction freeing scanner from scanning all memory on
> > very large zones (very noticeable for zones > 128GB, for instance) when
> > all splits will likely fail while holding zone->lock.
> >
>
> This collides pretty heavily with Joonsoo's "mm/compaction: split
> freepages without holding the zone lock".
>
> I ended up with this, in isolate_freepages_block():
>
> /* Found a free page, will break it into order-0 pages */
> order = page_order(page);
> isolated = __isolate_free_page(page, page_order(page));
> set_page_private(page, order);
>
> total_isolated += isolated;
> cc->nr_freepages += isolated;
> list_add_tail(&page->lru, freelist);
>
> if (!strict && cc->nr_migratepages <= cc->nr_freepages) {
> blockpfn += isolated;
> break;
> }
> /* Advance to the end of split page */
> blockpfn += isolated - 1;
> cursor += isolated - 1;
> continue;
>
> isolate_fail:
>
And
mm-compaction-split-freepages-without-holding-the-zone-lock-fix.patch
churns things around some more. Now this:
/* Found a free page, will break it into order-0 pages */
order = page_order(page);
isolated = __isolate_free_page(page, order);
set_page_private(page, order);
total_isolated += isolated;
list_add_tail(&page->lru, freelist);
cc->nr_freepages += isolated;
if (!strict && cc->nr_migratepages <= cc->nr_freepages) {
blockpfn += isolated;
break;
}
/* Advance to the end of split page */
blockpfn += isolated - 1;
cursor += isolated - 1;
continue;
isolate_fail:
and things are looking a bit better...
next prev parent reply other threads:[~2016-06-22 21:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 21:47 [patch -mm 1/2] mm/compaction: split freepages without holding the zone lock fix David Rientjes
2016-06-21 21:47 ` [patch -mm 2/2] mm, compaction: abort free scanner if split fails David Rientjes
2016-06-22 1:22 ` [patch] " David Rientjes
2016-06-22 11:02 ` Vlastimil Babka
2016-06-22 21:56 ` Andrew Morton
2016-06-22 21:59 ` Andrew Morton [this message]
2016-06-22 23:40 ` David Rientjes
2016-06-23 11:21 ` Vlastimil Babka
2016-06-22 22:06 ` David Rientjes
2016-06-22 22:42 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2016-06-15 22:34 [patch] mm, compaction: ignore watermarks when isolating free pages David Rientjes
2016-06-16 7:15 ` Vlastimil Babka
2016-06-20 22:27 ` [patch] mm, compaction: abort free scanner if split fails David Rientjes
2016-06-21 11:43 ` Vlastimil Babka
2016-06-21 20:43 ` David Rientjes
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=20160622145902.9f07aa13048d4782c881cb6c@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=minchan@kernel.org \
--cc=rientjes@google.com \
--cc=stable@vger.kernel.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).