Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-25 Thread Eric B Munson
On Wed, 24 Jun 2015, Michal Hocko wrote: On Mon 22-06-15 10:18:06, Eric B Munson wrote: On Mon, 22 Jun 2015, Michal Hocko wrote: On Fri 19-06-15 12:43:33, Eric B Munson wrote: [...] Are you objecting to the addition of the VMA flag VM_LOCKONFAULT, or the new MAP_LOCKONFAULT flag

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-24 Thread Michal Hocko
On Mon 22-06-15 10:18:06, Eric B Munson wrote: On Mon, 22 Jun 2015, Michal Hocko wrote: On Fri 19-06-15 12:43:33, Eric B Munson wrote: [...] Are you objecting to the addition of the VMA flag VM_LOCKONFAULT, or the new MAP_LOCKONFAULT flag (or both)? I thought the MAP_FAULTPOPULATE

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-24 Thread Michal Hocko
On Tue 23-06-15 14:45:17, Vlastimil Babka wrote: On 06/22/2015 04:18 PM, Eric B Munson wrote: On Mon, 22 Jun 2015, Michal Hocko wrote: On Fri 19-06-15 12:43:33, Eric B Munson wrote: [...] My thought on detecting was that someone might want to know if they had a VMA that was VM_LOCKED but

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-23 Thread Vlastimil Babka
On 06/22/2015 04:18 PM, Eric B Munson wrote: On Mon, 22 Jun 2015, Michal Hocko wrote: On Fri 19-06-15 12:43:33, Eric B Munson wrote: On Fri, 19 Jun 2015, Michal Hocko wrote: On Thu 18-06-15 16:30:48, Eric B Munson wrote: On Thu, 18 Jun 2015, Michal Hocko wrote: [...] Wouldn't it be much

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-22 Thread Michal Hocko
On Fri 19-06-15 12:43:33, Eric B Munson wrote: On Fri, 19 Jun 2015, Michal Hocko wrote: On Thu 18-06-15 16:30:48, Eric B Munson wrote: On Thu, 18 Jun 2015, Michal Hocko wrote: [...] Wouldn't it be much more reasonable and straightforward to have MAP_FAULTPOPULATE as a counterpart

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-22 Thread Eric B Munson
On Mon, 22 Jun 2015, Michal Hocko wrote: On Fri 19-06-15 12:43:33, Eric B Munson wrote: On Fri, 19 Jun 2015, Michal Hocko wrote: On Thu 18-06-15 16:30:48, Eric B Munson wrote: On Thu, 18 Jun 2015, Michal Hocko wrote: [...] Wouldn't it be much more reasonable and

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-19 Thread Michal Hocko
On Thu 18-06-15 16:30:48, Eric B Munson wrote: On Thu, 18 Jun 2015, Michal Hocko wrote: [...] Wouldn't it be much more reasonable and straightforward to have MAP_FAULTPOPULATE as a counterpart for MAP_POPULATE which would explicitly disallow any form of pre-faulting? It would be usable for

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-19 Thread Eric B Munson
On Fri, 19 Jun 2015, Michal Hocko wrote: On Thu 18-06-15 16:30:48, Eric B Munson wrote: On Thu, 18 Jun 2015, Michal Hocko wrote: [...] Wouldn't it be much more reasonable and straightforward to have MAP_FAULTPOPULATE as a counterpart for MAP_POPULATE which would explicitly disallow

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-18 Thread Michal Hocko
[Sorry for the late reply - I meant to answer in the previous threads but something always preempted me from that] On Wed 10-06-15 09:26:48, Eric B Munson wrote: The cost of faulting in all memory to be locked can be very high when working with large mappings. If only portions of the mapping

Re: [RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-18 Thread Eric B Munson
On Thu, 18 Jun 2015, Michal Hocko wrote: [Sorry for the late reply - I meant to answer in the previous threads but something always preempted me from that] On Wed 10-06-15 09:26:48, Eric B Munson wrote: The cost of faulting in all memory to be locked can be very high when working with

[RESEND PATCH V2 1/3] Add mmap flag to request pages are locked after page fault

2015-06-10 Thread Eric B Munson
The cost of faulting in all memory to be locked can be very high when working with large mappings. If only portions of the mapping will be used this can incur a high penalty for locking. For the example of a large file, this is the usage pattern for a large statical language model (probably