From: Jisheng Zhang <jszhang@marvell.com>
To: akpm@linux-foundation.org, mgorman@techsingularity.net,
chris@chris-wilson.co.uk, rientjes@google.com,
iamjoonsoo.kim@lge.com, npiggin@kernel.dk, agnel.joel@gmail.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Jisheng Zhang <jszhang@marvell.com>
Subject: [PATCH] mm/vmalloc: reduce the number of lazy_max_pages to reduce latency
Date: Thu, 29 Sep 2016 15:34:11 +0800 [thread overview]
Message-ID: <20160929073411.3154-1-jszhang@marvell.com> (raw)
On Marvell berlin arm64 platforms, I see the preemptoff tracer report
a max 26543 us latency at __purge_vmap_area_lazy, this latency is an
awfully bad for STB. And the ftrace log also shows __free_vmap_area
contributes most latency now. I noticed that Joel mentioned the same
issue[1] on x86 platform and gave two solutions, but it seems no patch
is sent out for this purpose.
This patch adopts Joel's first solution, but I use 16MB per core
rather than 8MB per core for the number of lazy_max_pages. After this
patch, the preemptoff tracer reports a max 6455us latency, reduced to
1/4 of original result.
[1] http://lkml.iu.edu/hypermail/linux/kernel/1603.2/04803.html
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 91f44e7..66f377a 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -596,7 +596,7 @@ static unsigned long lazy_max_pages(void)
log = fls(num_online_cpus());
- return log * (32UL * 1024 * 1024 / PAGE_SIZE);
+ return log * (16UL * 1024 * 1024 / PAGE_SIZE);
}
static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);
--
2.9.3
--
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 reply other threads:[~2016-09-29 7:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 7:34 Jisheng Zhang [this message]
2016-09-29 8:18 ` [PATCH] mm/vmalloc: reduce the number of lazy_max_pages to reduce latency Chris Wilson
2016-09-29 8:28 ` Jisheng Zhang
2016-09-29 11:07 ` Chris Wilson
2016-09-29 11:18 ` Jisheng Zhang
2016-10-09 3:43 ` Joel Fernandes
2016-10-09 12:42 ` Chris Wilson
2016-10-09 19:00 ` Joel Fernandes
2016-10-09 19:26 ` Chris Wilson
2016-10-11 5:06 ` Joel Fernandes
2016-10-11 5:34 ` Joel Fernandes
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=20160929073411.3154-1-jszhang@marvell.com \
--to=jszhang@marvell.com \
--cc=agnel.joel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=npiggin@kernel.dk \
--cc=rientjes@google.com \
/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).