The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* MAP_POPULATE vs. MADV_HUGEPAGES
@ 2017-03-15 16:50 Avi Kivity
  2017-03-16 12:34 ` Michal Hocko
  0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2017-03-15 16:50 UTC (permalink / raw)
  To: linux-kernel, linux-mm

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()?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-16 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 16:50 MAP_POPULATE vs. MADV_HUGEPAGES Avi Kivity
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox