[lkml]   [2013]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectmmap() scalability in the presence of the MAP_POPULATE flag
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?


 \ /
  Last update: 2013-01-02 18:21    [W:0.096 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site