Re: [PATCH v3 4/4] overcommit: introduce mem-lock=on-fault

2025-01-21 Thread Daniil Tatianin
On 1/9/25 5:18 PM, Peter Xu wrote: On Thu, Jan 09, 2025 at 11:47:40AM +0300, Daniil Tatianin wrote: On 12/12/24 7:20 PM, Peter Xu wrote: On Thu, Dec 12, 2024 at 02:04:33AM +0300, Daniil Tatianin wrote: Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory wit

Re: [PATCH v3 4/4] overcommit: introduce mem-lock=on-fault

2025-01-09 Thread Peter Xu
On Thu, Jan 09, 2025 at 11:47:40AM +0300, Daniil Tatianin wrote: > On 12/12/24 7:20 PM, Peter Xu wrote: > > > On Thu, Dec 12, 2024 at 02:04:33AM +0300, Daniil Tatianin wrote: > > > Locking the memory without MCL_ONFAULT instantly prefaults any mmaped > > > anonymous memory with a write-fault, whic

Re: [PATCH v3 4/4] overcommit: introduce mem-lock=on-fault

2025-01-09 Thread Daniil Tatianin
On 12/12/24 7:20 PM, Peter Xu wrote: On Thu, Dec 12, 2024 at 02:04:33AM +0300, Daniil Tatianin wrote: Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory with a write-fault, which introduces a lot of extra overhead in terms of memory usage when all you want to

Re: [PATCH v3 4/4] overcommit: introduce mem-lock=on-fault

2024-12-12 Thread Vladimir Sementsov-Ogievskiy
On 12.12.24 02:04, Daniil Tatianin wrote: Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory with a write-fault, which introduces a lot of extra overhead in terms of memory usage when all you want to do is to prevent kcompactd from migrating and compacting QEMU

Re: [PATCH v3 4/4] overcommit: introduce mem-lock=on-fault

2024-12-12 Thread Peter Xu
On Thu, Dec 12, 2024 at 02:04:33AM +0300, Daniil Tatianin wrote: > Locking the memory without MCL_ONFAULT instantly prefaults any mmaped > anonymous memory with a write-fault, which introduces a lot of extra > overhead in terms of memory usage when all you want to do is to prevent > kcompactd from

[PATCH v3 4/4] overcommit: introduce mem-lock=on-fault

2024-12-11 Thread Daniil Tatianin
Locking the memory without MCL_ONFAULT instantly prefaults any mmaped anonymous memory with a write-fault, which introduces a lot of extra overhead in terms of memory usage when all you want to do is to prevent kcompactd from migrating and compacting QEMU pages. Add an option to only lock pages laz