linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: 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 15:06:29 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1606221502140.146497@chino.kir.corp.google.com> (raw)
In-Reply-To: <20160622145617.79197acff1a7e617b9d9d393@linux-foundation.org>

On Wed, 22 Jun 2016, Andrew Morton 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".
> 

Sorry if it wasn't clear, but I was proposing this patch for 4.7 
inclusion and Vlastimil agreed we should ask for that.  Joonsoo said he 
was prepared to rebase on top of that.  Is 
mm-compaction-split-freepages-without-holding-the-zone-lock.patch and 
friends going into 4.7 or are we deferring this fix until 4.8?

compaction_alloc() iterating a 128GB zone has been benchmarked to take 
over 400ms on some systems whereas any free page isolated and ready to be 
split ends up failing in split_free_page() because of the low watermark 
check and thus the iteration continues.

The next time compaction occurs, the freeing scanner will likely start at 
the end of the zone again since no success was made previously and we get 
the same lengthy iteration until the zone is brought above the low 
watermark.  All thp page faults can take >400ms in such a state without 
this fix.

--
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>

  parent reply	other threads:[~2016-06-22 22:06 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
2016-06-22 23:40       ` David Rientjes
2016-06-23 11:21         ` Vlastimil Babka
2016-06-22 22:06     ` David Rientjes [this message]
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=alpine.DEB.2.10.1606221502140.146497@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=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=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