lkml.org 
[lkml]   [2013]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting
On 06/27/2013 10:47 PM, Zheng Liu wrote:
>> I've been doing some testing involving large amounts of
>> page cache. It's quite painful to get hundreds of GB
>> of page cache mapped in, especially when I am trying to
>> do it in parallel threads. This is true even when the
>> page cache is already allocated and I only need to map
>> it in. The test:
>>
>> 1. take 160 16MB files
>> 2. clone 160 threads, mmap the 16MB files, and either
>> a. walk through the file touching each page
>
> Why not change MAP_POPULATE flag in mmap(2)? Now it is only for private
> mappings. But maybe we could let it support shared mapping.

Adding that support to mmap() will certainly _help_ some folks. But,
anything that mmap()s something is taking mmap_sem for write. That
means that threaded apps doing mmap()/munmap() frequently are _not_
scalable.

IOW, a process needing to do a bunch of MAP_POPULATEs isn't
parallelizable, but one using this mechanism would be.


\
 
 \ /
  Last update: 2013-06-28 20:01    [W:0.186 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site