linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Joonsoo Kim <js1304@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>, Shaohua Li <shli@fb.com>,
	Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@suse.cz>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH v2] mm/slub: don't wait for high-order page allocation
Date: Wed, 12 Aug 2015 15:31:20 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1508121529400.11921@chino.kir.corp.google.com> (raw)
In-Reply-To: <1438913403-3682-1-git-send-email-iamjoonsoo.kim@lge.com>

On Fri, 7 Aug 2015, Joonsoo Kim wrote:

> Almost description is copied from commit fb05e7a89f50
> ("net: don't wait for order-3 page allocation").
> 
> I saw excessive direct memory reclaim/compaction triggered by slub.
> This causes performance issues and add latency. Slub uses high-order
> allocation to reduce internal fragmentation and management overhead. But,
> direct memory reclaim/compaction has high overhead and the benefit of
> high-order allocation can't compensate the overhead of both work.
> 
> This patch makes auxiliary high-order allocation atomic. If there is
> no memory pressure and memory isn't fragmented, the alloction will still
> success, so we don't sacrifice high-order allocation's benefit here.
> If the atomic allocation fails, direct memory reclaim/compaction will not
> be triggered, allocation fallback to low-order immediately, hence
> the direct memory reclaim/compaction overhead is avoided. In the
> allocation failure case, kswapd is waken up and trying to make high-order
> freepages, so allocation could success next time.
> 
> Following is the test to measure effect of this patch.
> 
> System: QEMU, CPU 8, 512 MB
> Mem: 25% memory is allocated at random position to make fragmentation.
>  Memory-hogger occupies 150 MB memory.
> Workload: hackbench -g 20 -l 1000
> 
> Average result by 10 runs (Base va Patched)
> 
> elapsed_time(s): 4.3468 vs 2.9838
> compact_stall: 461.7 vs 73.6
> pgmigrate_success: 28315.9 vs 7256.1
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Acked-by: David Rientjes <rientjes@google.com>

--
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:[~2015-08-12 22:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  2:10 Joonsoo Kim
2015-08-07 15:05 ` Michal Hocko
2015-08-10  0:40   ` Joonsoo Kim
2015-08-11  6:36     ` Michal Hocko
2015-08-12 22:31 ` David Rientjes [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=alpine.DEB.2.10.1508121529400.11921@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=edumazet@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=penberg@kernel.org \
    --cc=shli@fb.com \
    --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