[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e134e521-54eb-9ae0-f379-26f38703478e@scylladb.com>
Date: Wed, 15 Mar 2017 18:50:32 +0200
From: Avi Kivity <avi@...lladb.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: MAP_POPULATE vs. MADV_HUGEPAGES
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()?
Powered by blists - more mailing lists