public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* mmap() scalability in the presence of the MAP_POPULATE flag
@ 2013-01-02 16:50 Roman Dubtsov
  2013-01-03  0:09 ` Michel Lespinasse
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Dubtsov @ 2013-01-02 16:50 UTC (permalink / raw)
  To: linux-kernel

Concurrent mmap() calls from the same process are serialized via downing
mm->mmap_sem for write. This means that operations like populating the
pages which do not alter vmas are also performed serially. Anecdotal
data from two machines I have access to is that populating pages by
touching them in a loop outside of mmap() improves performance of the
synthetic micro-benchmark by ~40% in the worst case. A crude patch that
modifies vm_mmap_pgoff() to call make_pages_present() outside of
do_mmap_pgoff() after upping the semaphore when MAP_POPULATE is present
brings identical performance improvement.

Is there an interest in fixing this or concurrent mmaps() from the same
process are too much of a corner case to worry about it?

Regards,
Roma 


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

end of thread, other threads:[~2013-01-31  0:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 16:50 mmap() scalability in the presence of the MAP_POPULATE flag Roman Dubtsov
2013-01-03  0:09 ` Michel Lespinasse
2013-01-03 17:09   ` Roman Dubtsov
2013-01-04 11:57     ` Michel Lespinasse
2013-01-05  6:40       ` Roman Dubtsov
2013-01-05  7:43         ` Michel Lespinasse
2013-01-31  0:31           ` Michel Lespinasse

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