From: Avi Kivity <avi@scylladb.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: MAP_POPULATE vs. MADV_HUGEPAGES
Date: Wed, 15 Mar 2017 18:50:32 +0200 [thread overview]
Message-ID: <e134e521-54eb-9ae0-f379-26f38703478e@scylladb.com> (raw)
A user is trying to allocate 1TB of anonymous memory in parallel on 48
cores (4 NUMA nodes). The kernel ends up spinning in
isolate_freepages_block().
I thought to help it along by using MAP_POPULATE, but then my
MADV_HUGEPAGE won't be seen until after mmap() completes, with pages
already populated. Are MAP_POPULATE and MADV_HUGEPAGE mutually exclusive?
Is my only option to serialize those memory allocations, and fault in
those pages manually? Or perhaps use mlock()?
--
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:[~2017-03-15 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 16:50 Avi Kivity [this message]
2017-03-16 12:34 ` Michal Hocko
2017-03-16 13:26 ` Avi Kivity
2017-03-16 14:48 ` Michal Hocko
2017-03-16 14:56 ` Avi Kivity
2017-03-16 15:01 ` Michal Hocko
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=e134e521-54eb-9ae0-f379-26f38703478e@scylladb.com \
--to=avi@scylladb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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