From: Andrea Arcangeli <aarcange@redhat.com>
To: Hush Bensen <hush.bensen@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>,
linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
Hugh Dickins <hughd@google.com>,
Richard Davies <richard@arachsys.com>,
Shaohua Li <shli@kernel.org>, Rafael Aquini <aquini@redhat.com>
Subject: Re: [PATCH 7/7] mm: compaction: add compaction to zone_reclaim_mode
Date: Mon, 15 Jul 2013 11:16:21 +0200 [thread overview]
Message-ID: <20130715091621.GQ4081@redhat.com> (raw)
In-Reply-To: <51E0900E.9080504@gmail.com>
On Sat, Jul 13, 2013 at 07:23:58AM +0800, Hush Bensen wrote:
> Do you mean your patch done this fair? There is target zone shrink as
> you mentiond in the vanilla kernel, however, your patch also done target
> compaction/reclaim, is this fair?
It's still not fair, zone_reclaim_mode cannot be (modulo major rework
at least) as its whole point is to reclaim memory from the local node
indefinitely, even if there's plenty of "free" or "reclaimable" memory
in remote nodes.
But waking kswapd before all nodes are below the low wmark probably
would make it even less fair than it is now, or at least it wouldn't
provide a fariness increase.
The idea of allowing allocations in the min-low wmark range is that
the "low" wmark would be restored soon anyway at the next
zone_reclaim() invocation, and the zone_reclaim will still behave
synchronous (like direct reclaim) without ever waking kswapd,
regardless if we stop at the low or at the min. But if we stop at the
"low" we're more susceptible to parallel allocation jitters as the
jitter-error margin then becomes:
.nr_to_reclaim = max(nr_pages, SWAP_CLUSTER_MAX),
which is just 1 single high order page in case of (1<<order) >=
SWAP_CLUSTER_MAX. While if we use the "min" wmark after a successful
zone_reclaim(zone) to decide if to allocate from the zone (the one
passed to zone_reclaim, we may have more margin for allocation jitters
in other CPUs of the same node, or interrupts.
So this again is connected to altering the wmark calculation for high
order pages in the previous patch (which also is intended to allow
having more than 1 THP page in the low-min wmark range). We don't need
many, too many is just a waste of CPU, but a few more than 1
significantly improves the NUMA locality on first allocation if all
CPUs in the node are allocating memory at the same time. I also
trimmed down to zero the high order page requirement for the min
wmark, as we don't need to guarantee hugepage availability for
PF_MEMALLOC (which avoids useless compaction work).
--
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>
next prev parent reply other threads:[~2013-07-15 9:16 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 15:10 [PATCH 0/7] RFC: adding compaction to zone_reclaim_mode > 0 Andrea Arcangeli
2013-06-05 15:10 ` [PATCH 1/7] mm: remove ZONE_RECLAIM_LOCKED Andrea Arcangeli
2013-06-05 19:23 ` Rik van Riel
2013-06-05 20:37 ` KOSAKI Motohiro
2013-06-05 20:51 ` Christoph Lameter
2013-06-05 21:03 ` KOSAKI Motohiro
2013-06-06 14:15 ` Christoph Lameter
2013-06-06 17:17 ` KOSAKI Motohiro
2013-06-06 18:16 ` Christoph Lameter
2013-06-05 21:33 ` Rafael Aquini
2013-06-06 9:04 ` Mel Gorman
2013-06-06 17:37 ` Rik van Riel
2013-06-14 16:16 ` Rik van Riel
2013-06-17 9:30 ` Mel Gorman
2013-06-17 18:12 ` Rik van Riel
2013-06-26 20:10 ` Andrea Arcangeli
2013-06-05 15:10 ` [PATCH 2/7] mm: compaction: scan all memory with /proc/sys/vm/compact_memory Andrea Arcangeli
2013-06-05 19:34 ` Rik van Riel
2013-06-05 21:39 ` Rafael Aquini
2013-06-06 9:05 ` Mel Gorman
2013-06-05 15:10 ` [PATCH 3/7] mm: compaction: don't depend on kswapd to invoke reset_isolation_suitable Andrea Arcangeli
2013-06-05 19:49 ` Rik van Riel
2013-06-26 20:38 ` Andrea Arcangeli
2013-06-06 9:11 ` Mel Gorman
2013-06-26 20:48 ` Andrea Arcangeli
2013-06-06 12:47 ` Rafael Aquini
2013-06-05 15:10 ` [PATCH 4/7] mm: compaction: reset before initializing the scan cursors Andrea Arcangeli
2013-06-05 20:04 ` Rik van Riel
2013-06-06 9:14 ` Mel Gorman
2013-06-06 12:49 ` Rafael Aquini
2013-06-05 15:10 ` [PATCH 5/7] mm: compaction: increase the high order pages in the watermarks Andrea Arcangeli
2013-06-05 20:18 ` Rik van Riel
2013-06-28 22:14 ` Andrea Arcangeli
2013-06-06 9:19 ` Mel Gorman
2013-06-05 15:10 ` [PATCH 6/7] mm: compaction: export compact_zone_order() Andrea Arcangeli
2013-06-05 20:24 ` Rik van Riel
2013-06-05 15:10 ` [PATCH 7/7] mm: compaction: add compaction to zone_reclaim_mode Andrea Arcangeli
2013-06-05 22:21 ` Rik van Riel
2013-06-06 10:05 ` Mel Gorman
2013-07-11 16:02 ` Andrea Arcangeli
2013-07-12 12:26 ` Hush Bensen
2013-07-12 16:01 ` Andrea Arcangeli
2013-07-12 23:23 ` Hush Bensen
2013-07-15 9:16 ` Andrea Arcangeli [this message]
2013-07-12 23:57 ` Hush Bensen
2013-07-15 9:25 ` Andrea Arcangeli
2013-06-06 8:53 ` [PATCH 0/7] RFC: adding compaction to zone_reclaim_mode > 0 Mel Gorman
2013-06-06 10:09 ` Mel Gorman
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=20130715091621.GQ4081@redhat.com \
--to=aarcange@redhat.com \
--cc=aquini@redhat.com \
--cc=hughd@google.com \
--cc=hush.bensen@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=richard@arachsys.com \
--cc=riel@redhat.com \
--cc=shli@kernel.org \
/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).