lkml.org 
[lkml]   [2013]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: mmap() scalability in the presence of the MAP_POPULATE flag
From
Hi Roman,

On Fri, Jan 4, 2013 at 11:43 PM, Michel Lespinasse <walken@google.com> wrote:
> On Fri, Jan 4, 2013 at 10:40 PM, Roman Dubtsov <dubtsov@gmail.com> wrote:
>> - POPULATE_VIA_LOOP -- makes the test populate memory using a loop
>> - POPULATE_VIA_MMAP -- makes the test populate memory via MAP_POPULATE
>>
> Heh, very interesting. As it turns out, the problem gets MUCH worse as
> the number of threads increase.
>
> In the POPULATE_VIA_MMAP, follow_page() is called at 4KB increment
> addresses, and it takes the mm->page_table_lock 511 times out of 512
> (that is, every time it falls within a huge page that's just been
> populated). So all OMP_NUM_THREADS threads are constantly bouncing
> over the mm->page_table_lock, and getting terrible performance as a
> result.

FYI, the patchset I just sent out ("fixes for large mm_populate() and
munlock() operations") takes care of this and brings POPULATE_VIA_MMAP
performance up where it should be.

Thanks a lot for the report, as I hadn't noticed this issue before :)

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.


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