Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-07-14 Thread Zheng Liu
On Sun, Jul 14, 2013 at 11:12:58AM +0800, Sam Ben wrote: > On 07/02/2013 10:37 AM, Zheng Liu wrote: > >On Mon, Jul 01, 2013 at 09:16:46AM -0700, Dave Hansen wrote: > >>On 06/28/2013 07:20 PM, Zheng Liu wrote: > >IOW, a process needing to do a bunch of MAP_POPULATEs isn't > >parallelizable,

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-07-13 Thread Sam Ben
On 07/02/2013 10:37 AM, Zheng Liu wrote: On Mon, Jul 01, 2013 at 09:16:46AM -0700, Dave Hansen wrote: On 06/28/2013 07:20 PM, Zheng Liu wrote: IOW, a process needing to do a bunch of MAP_POPULATEs isn't parallelizable, but one using this mechanism would be. I look at the code, and it seems tha

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-07-01 Thread Zheng Liu
On Mon, Jul 01, 2013 at 09:43:29PM -0700, Dave Hansen wrote: > On 07/01/2013 07:37 PM, Zheng Liu wrote: > > FWIW, it would be great if we can let MAP_POPULATE flag support shared > > mappings because in our product system there has a lot of applications > > that uses mmap(2) and then pre-faults thi

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-07-01 Thread Dave Hansen
On 07/01/2013 07:37 PM, Zheng Liu wrote: > FWIW, it would be great if we can let MAP_POPULATE flag support shared > mappings because in our product system there has a lot of applications > that uses mmap(2) and then pre-faults this mapping. Currently these > applications need to pre-fault the mapp

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-07-01 Thread Zheng Liu
On Mon, Jul 01, 2013 at 09:16:46AM -0700, Dave Hansen wrote: > On 06/28/2013 07:20 PM, Zheng Liu wrote: > >> > IOW, a process needing to do a bunch of MAP_POPULATEs isn't > >> > parallelizable, but one using this mechanism would be. > > I look at the code, and it seems that we will handle MAP_POPUL

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-07-01 Thread Dave Hansen
On 06/28/2013 07:20 PM, Zheng Liu wrote: >> > IOW, a process needing to do a bunch of MAP_POPULATEs isn't >> > parallelizable, but one using this mechanism would be. > I look at the code, and it seems that we will handle MAP_POPULATE flag > after we release mmap_sem locking in vm_mmap_pgoff(): > >

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-06-28 Thread Zheng Liu
On 06/28/2013 11:48 PM, Dave Hansen wrote: > 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. Thi

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-06-28 Thread Dave Hansen
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

Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-06-27 Thread Zheng Liu
Hi Dave, On Thu, Jun 27, 2013 at 04:16:05PM -0700, Dave Hansen 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

[RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting

2013-06-27 Thread Dave Hansen
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.